I would like to be able to bind non-american character keys in my game. There are many issues with this. First, Panda doesn’t fire an event for keys like “Ñ” in a spanish keyboard. This is easy to fix by adding the code (241) to panda but it’s just a hack, for example, what about other layouts or keyboards with arbitrary keys, such us this monstrosity. I would like to be able to tell Panda to capture a key, like most games do in their key bindings screen. Then I would store the keycode and use that for future comparisons. I would just need a method for Panda to send me arbitrary keycode events and another method for getting the next keycode. Are these things possible? If not, I’ll implement them. Any suggestions, warnings, etc. would be appreciated.
But even if we fix that there’s another problem that I don’t know how to fix. The composed character sequences, such as ´ ^ `, that in non-american keyboards let you do characters like á ë ô or ~. At the low level panda isn’t receiving separate events for “^” and “o”, rather, the first event doesn’t happen and then a keycode is received corresponding to the “ô” character. By lowlevel I mean mouseAndKeyboard::do_transmit_data, where a MouseButton is received from the window. While this is convenient for a PGEntry input, for example, it’s inconvenient for the game itself because I would like to be able to bind the ´ key. Most of the games I’ve played let me do that, so this is a big problem with the panda input system.
If those things are impossible or hard to fix in panda, is it possible to use something else for input, like OIS? (Specifically I would like to use OIS for keyboard and still use panda for mouse, reason being that I prefer a windows api controlled mouse, like panda does, rather than directinput, cause directinput interpolates the raw values and it adds some delay)
(All this happens in Windows, btw, I don’t know about other platforms.)
Edit: After thinking about it, directinput for keyboard (as OIS does) has a lot of drawbacks too, so I’m very interested in fixing this in panda: 1) getting and listening for arbitrary keycodes 2) Separated concepts for character presses (“ô”) and key presses ("^", “o”)