You don't. You have all the scancodes that are available on most modern keyboards, that's it.rmcode wrote: ↑Wed Nov 08, 2017 11:03 pmI'm looking into input handling atm. As far as I understand the best way to go is using scancodes because they aren't dependent on the user's keyboard locale. Naturally there aren't scancodes for some keys like "?" or "A". What's the best practise to handle these?
Yes and you're right.
That's not a bad idea, though you probably wanted to write something like this instead:rmcode wrote: ↑Wed Nov 08, 2017 11:03 pmI thought I could maybe saveCode: Select all
command = { keycombination = "lshift", "1", actualCharacter = "!" }
Code: Select all
command = { keycombination = {"lshift", "1"}, actualCharacter = "!" }
With textinput, but again, you should only use it as an indicator, if anything; also, getting the non-modified key is also somewhat hard if you want to not use key nor scancodes, since you'd need both the un-modified textinput and the modified one, which you can't really get at the same time (For example, for me, the '$' sign is 'AltGr'+'é', but 'AltGr' is where [rAlt] should be, and 'é' is the key next to [l] (on the right), which has both a different key and scancode (hell, my example is double problematic, since alt-gr maps to ctrl+alt with SDL)