I have a curious question. How does the Mouse&Keyboard work with Python? I'm trying to capture some of the input keys and stumbled upon the MouseKeyboard.OnAnyKey() option, which might be useful for this. There's no MouseKeyboard.LastKeyPressed, so I'm going the other way around. Let's say I have this:
How am I supposed to use this? Is it something like:
Any help appreciated, I'll try to experiment with this on my own in the meantime. :)
Edit: I was able to make it somehow work, by using
But it seems to work only with VK_ keys, according to this post: scirra.com/forum/construct-keyboard-in-python_topic39918.html
That is: I can test for space button, or the Numpad buttons, but no A, S, D keys and so on. Any way to do this?
Thanks in advance!
Edit#2: Well, it seems a light fever helped me find the solution. The keys mentioned in that mapping thread are 0-indexed, so that I had to subtract 1 from every each value I wanted to map. Now it works like a charm, I think.