jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
615 stars 68 forks source link

bindkey(number) do not respond on raspbian #591

Closed jakpanu closed 4 years ago

jakpanu commented 4 years ago

I try to use bindKey to do something when I press "1" or other numbers on a keypad. Below code is run normally on Windows. But on Raspbian, its response only when I press "c" but no response when I press "1" on the keypad. What's wrong?

from appJar import gui

def pnt(a): print(a)

with gui("xx") as app: app.bindKey("c", pnt) app.bindKey("Key-1", pnt)

jarvisteach commented 4 years ago

It's working fine on Mac as well. I'll need to do some testing on a Pi...

jarvisteach commented 4 years ago

I've tested this on my pi - and I get the expected response when I press the 1 key.

@jakpanu - does it work when you're pressing 1s along the top row?

Or, maybe it is a numlock issue?

jarvisteach commented 4 years ago

OK, just tested this direct on the pi (not through VNC) and it's definitely a keypad issue.

It must be that there's a different binding for the keypad, I'll need to get digging

jarvisteach commented 4 years ago

The bindings for keys on the keypad are: KP_ for other keys it's Key-

So for now, if you are adding a number key, I will bind both the keypad and key to the same event

jarvisteach commented 4 years ago

Hopefully this resolves it