wkentaro/imgviz

Keys in pyglet_imshow are not handled correctly if numlock is enabled

streckus opened this issue · 3 comments

Hi, I think I found a bug in the pyglet_imshow module.

These checks seem to cause the on_key_press function to return without any output/action if numlock (modifiers = 16) or capslock (modifiers = 8) is enabled. Is this desired behaviour?

if modifiers == 0:

if modifiers == 0:

if modifiers == 0:

That's expected, but I'm fine to change it since some people accidentally enable NumLock, which does not exist on my keyboard.

Maybe you could add some helpful output if the condition isn't met. On my machine NumLock was enabled by default and I had to debug into the code to find out why it wasn't working.

Removed the if block. Thanks for the feedback.