This console shows up by pressing the grave key, which in US keyboards is on the top left corner.
However, on my keyboard the KeyInput.KEY_GRAVE is somewhere near the “enter” key, which is not what I want (on my top left corner I have a backslash instead).
Is there a way to map a key ‘position’ so that it works regardless of locale? I remember it worked correctly with Quake…
Though as an added thought, it may be possible to use keyboard “scancodes” (these represent a grid on a keyboard) but it depends what the keyboard driver will give you at the mighty high level of java.
If this is not exposed, you would have to use JNI to hook into the keyboard driver.
The scancode you’re looking for is 35 for the grave key, (assuming a USB keyboard/encoding)
Grave key is 29 for type 1 and 0e for type 2 or 3. This will be independent of keyboard language