PojavLauncher
PojavLauncher copied to clipboard
[BUG] <Can't input "HOME"key from physical keyboard>
Describe the bug
I am Japanese and am currently using a Japanese layout keyboard and mouse connected via Bluetooth.
It's probably a key mapping issue and I think it can be reproduced even with a different type of keyboard, but I can't input the HOME key from the keyboard.
When I looked at the source, this was found in EfficientAndroidLWJGLKeycode.java.
It seems to be converting from android key code to GLFW key,
The key name (key code) on the android side that occurs when you press the HOME key is KEYCODE_MOVE_HOME (122)
The expected key name on the GLFW side for the HOME key is GLFW_KEY_HOME,
The assignment to this key is KEYCODE_HOME(3), which is the HOME button displayed on the Android navigation bar. (Although the name is confusing...)
The log file and images/videos
maybe no need
Steps To Reproduce
When game runnimg,
keyinput "HOME"key from physical keyboard.
Expected Behavior
android keycode "KEYCODE_MOVE_HOME" make to "GLFW_KEY_HOME"
Platform
- Device model: SCG18
- CPU architecture: arm64-v8a
- Android version: 13
- PojavLauncher version: PojavLauncher-edelweiss
Anything else?
I'm aware of other keys that can't be pressed, but I think I can map some of them accurately.
In the first place, keys on the GLFW side are assumed to be in the US layout, so keys in the Japanese layout cannot be easily added because they are not defined in LwjglGlfwKeycode.java.
(I think it would be possible to input by assigning a key with a completely different name, but depending on the environment, there may be a risk of causing problems...)
If switch the keyboard layout then the scancode does not change, but the keycode changes and some keys position to shift.
(I'm a little confused because I can correctly input keys in the Japanese layout on x64 Ubuntu 22.04. Maybe I should look at the scancode instead of the android keycode...)