So, I'm writing a smallish adventure game in Python, which operates by means of commands being typed into a tkinter textbox, hitting enter or pressing a button to submit said commands, then there being a readout box that gives the results of whatever the action was.
Now, what I'd like to do is bind some autocommands to the numpad - particularly for navigation, so hitting the 8 feeds "NORTH" into the engine and so on.
This has mostly been successful, except for the bindings, which I can't get working; I can bind to other keys, just not the ones I want.
- with numpad on, the keys act the same as the standard number keys, type into the textbox, and ignore any bindings I place thereon. doesn't seem to bind anywhere, and <8> binds to both the numpad 8 and the standard 8 - in both cases they still type, which is suboptimal
- with numpad off it works a bit better, but I'd like to avoid duplicating to the other keys which is what seems to happen (so for example I can only seem to get the 8 to work by binding as , which also binds the standard up arrow - I get errors if I try and use KP_Up). I also can't for the life of me work out how to bind to the middle key (5).
Is there any way I can just bind the numpad keys? The documentation I've found all advises this use of KP but that just doesn't seem to be working. NB that I'm using windows.