So, I’ve recently been advised to switch from standard key-events to raw key-events when handling control-mappings.
However, I find myself uncertain of something:
If I use “ButtonThrower.setButtonDownEvent” to catch all keys, and print out the result, what would be the output on an international keyboard?
That is, if someone with a relevant international keyboard were to run the following, and then press, say, “ě”, what would be the output?
from direct.showbase.ShowBase import ShowBase
class Game(ShowBase):
def __init__(self):
ShowBase.__init__(self)
self.accept("escape", base.userExit)
self.buttonThrower = base.buttonThrowers[0].node()
self.buttonThrower.setButtonDownEvent("keyInterception")
self.accept("keyInterception", self.keyInterception)
def keyInterception(self, key):
print (key)
app = Game()
app.run()
(I’ve tried setting the OS’s “input source” to various international layouts, but it doesn’t seem to affect the above, or the effect of a standard key-event. And since I’ve had a report of a key not working, that seems to suggest that while the “input source” affects things like ordinary typing, it doesn’t affect the key-events used by Panda.)