to check whether the Left button is pressed. What about plus and minus. For minus i can use
g.keyboard.MINUS
, but it is not working for plus. I believe it is because shift has to be pressed on the same time. How about plus and minus on the num pad?
Does anybody know how to get plus and minus?
@CallError It’s g.keyboard.KP_PLUS for the numpad/keypad plus.
And g.keyboard.PLUS otherwise, and it works for me, i.e. for the key that gives me a + works, in my Icelandic keyboard setup (I think it’s the same for US keyboard; I actually have a Scandinavian keyboard and something else is printed on that key next to ENTER which gives me plus, it’s likely based on keycodes that do not change, also why they are different for the keypad).
EDIT: I can confirm g.keyboard.PLUS didn’t work for me (on Linux), but neither g.keyboard.MINUS (on the numpad at least), nor did I find this defined in the code, or any game. So is it supposed to work (that way)? Nor did I find anything useful defined in SimpleDirectMediaLayer.jl its dependency, so maybe it’s a limitation there, and also a known problem in similar project for Python, also based on it?
The “g.keyboard.PLUS” can only be used for keyboard layouts, which don’t require an extra button, like shift for example, to activate it. So I think it is good practice to put it into the code even though it doesn’t have an effect for the US keyboard layout.
The only thing which might can bring Problems for larger projects, could come in the form of users, who have exotic keyboard layouts. That is something to bare in mind.