-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FN, Cursor and numeric keypad keys not working on Ubuntu 18.04 #1654
Comments
Here is a workaround, I don't think this is a correct fix, the comments indicate this table should only be the printable chars not all, but it seems to work for me. I do not know enough about X11 keyboard handling to give a correct fix. In x11_init.c sdd the following to the table in CreateKeyTables() else if (strcmp(name, "ESC") == 0) key = GLFW_KEY_ESCAPE;
else if (strcmp(name, "FK01") == 0) key = GLFW_KEY_F1;
else if (strcmp(name, "FK02") == 0) key = GLFW_KEY_F2;
else if (strcmp(name, "FK03") == 0) key = GLFW_KEY_F3;
else if (strcmp(name, "FK04") == 0) key = GLFW_KEY_F4;
else if (strcmp(name, "FK05") == 0) key = GLFW_KEY_F5;
else if (strcmp(name, "FK06") == 0) key = GLFW_KEY_F6;
else if (strcmp(name, "FK07") == 0) key = GLFW_KEY_F7;
else if (strcmp(name, "FK08") == 0) key = GLFW_KEY_F8;
else if (strcmp(name, "FK09") == 0) key = GLFW_KEY_F9;
else if (strcmp(name, "FK10") == 0) key = GLFW_KEY_F10;
else if (strcmp(name, "FK11") == 0) key = GLFW_KEY_F11;
else if (strcmp(name, "FK12") == 0) key = GLFW_KEY_F12;
else if (strcmp(name, "UP") == 0) key = GLFW_KEY_UP;
else if (strcmp(name, "DOWN") == 0) key = GLFW_KEY_DOWN;
else if (strcmp(name, "LEFT") == 0) key = GLFW_KEY_LEFT;
else if (strcmp(name, "RGHT") == 0) key = GLFW_KEY_RIGHT;
else if (strcmp(name, "INS") == 0) key = GLFW_KEY_INSERT;
else if (strcmp(name, "DELE") == 0) key = GLFW_KEY_DELETE;
else if (strcmp(name, "TAB") == 0) key = GLFW_KEY_TAB;
else if (strcmp(name, "BKSP") == 0) key = GLFW_KEY_BACKSPACE;
else if (strcmp(name, "CAPS") == 0) key = GLFW_KEY_CAPS_LOCK;
else if (strcmp(name, "RTRN") == 0) key = GLFW_KEY_ENTER;
else if (strcmp(name, "LFSH") == 0) key = GLFW_KEY_LEFT_SHIFT;
else if (strcmp(name, "RTSH") == 0) key = GLFW_KEY_RIGHT_SHIFT;
else if (strcmp(name, "LCTL") == 0) key = GLFW_KEY_LEFT_CONTROL;
else if (strcmp(name, "LALT") == 0) key = GLFW_KEY_LEFT_ALT;
else if (strcmp(name, "SPCE") == 0) key = GLFW_KEY_SPACE;
else if (strcmp(name, "RALT") == 0) key = GLFW_KEY_RIGHT_ALT;
else if (strcmp(name, "RCTL") == 0) key = GLFW_KEY_RIGHT_CONTROL;
else if (strcmp(name, "PGUP") == 0) key = GLFW_KEY_PAGE_UP;
else if (strcmp(name, "PGDN") == 0) key = GLFW_KEY_PAGE_DOWN;
else if (strcmp(name, "HOME") == 0) key = GLFW_KEY_HOME;
else if (strcmp(name, "END") == 0) key = GLFW_KEY_END;
else if (strcmp(name, "NMLK") == 0) key = GLFW_KEY_NUM_LOCK;
else if (strcmp(name, "KPDV") == 0) key = GLFW_KEY_KP_DIVIDE;
else if (strcmp(name, "KPMU") == 0) key = GLFW_KEY_KP_MULTIPLY;
else if (strcmp(name, "KPSU") == 0) key = GLFW_KEY_KP_SUBTRACT;
else if (strcmp(name, "KPAD") == 0) key = GLFW_KEY_KP_ADD;
else if (strcmp(name, "KPEN") == 0) key = GLFW_KEY_KP_ENTER;
else if (strcmp(name, "KPDL") == 0) key = GLFW_KEY_KP_DECIMAL;
else if (strcmp(name, "KP0") == 0) key = GLFW_KEY_KP_0;
else if (strcmp(name, "KP1") == 0) key = GLFW_KEY_KP_1;
else if (strcmp(name, "KP2") == 0) key = GLFW_KEY_KP_2;
else if (strcmp(name, "KP3") == 0) key = GLFW_KEY_KP_3;
else if (strcmp(name, "KP4") == 0) key = GLFW_KEY_KP_4;
else if (strcmp(name, "KP5") == 0) key = GLFW_KEY_KP_5;
else if (strcmp(name, "KP6") == 0) key = GLFW_KEY_KP_6;
else if (strcmp(name, "KP7") == 0) key = GLFW_KEY_KP_7;
else if (strcmp(name, "KP8") == 0) key = GLFW_KEY_KP_8;
else if (strcmp(name, "KP9") == 0) key = GLFW_KEY_KP_9; |
This is very similar to the solution being worked on in #1598, which should hopefully resolve this issue as well. |
This should be fixed now with the work merged for #1598. |
The main alpha and numeric keys work fine but that is all.
Observing the output of tests/events shows
This is on a Dell laptop with US keyboard. I have also tried a UK full size keyboard.
Tim.
The text was updated successfully, but these errors were encountered: