This method will cause an issue for European keyboard layouts. My keyboard has the @ key and " key switched from their positions on an American keyboard. Developers should probably just avoid trying to use these keys in general.
Could we have some sort of function like “KeysLowerCase( Key)” or something that returns the key related to the character passed e.g. KeysLowerCase( “@” ) - Enum.KeyCode.2 or nil if there is none
So I’m currently in the middle of rewriting how windows/osx handles keyboard input. The general issue is you want to sometimes a) figure out what someone is typing and b) figure out what keys on the keyboard are pressed. These are not necessarily the same thing. Ideally for gameplay you would just want to be able to specify locations of keys for certain actions (ex: qwerty keyboard, when shift and 2 is pressed, do some action), and have it be the same location on all keyboards.
I just ordered a bunch of different keyboards with different layouts to make sure this will be the case, but generally plan on key codes being laid out in the US standard qwerty layout, and having those map to the same location physically on other keyboards. There will be a new InputObject type, called “TextInput”, that will contain a string of the thing the user has typed. Basically if you are holding shift + 2 on a US qwerty keyboard, TextInput will be the character @, but on a Irish qwerty keyboard you would get the character ".