| 533 | #endif |
| 534 | |
| 535 | static GLFWbool inputChar(_GLFWwindow* window, uint32_t key) |
| 536 | { |
| 537 | uint32_t code, numSyms; |
| 538 | long cp; |
| 539 | const xkb_keysym_t *syms; |
| 540 | xkb_keysym_t sym; |
| 541 | |
| 542 | code = key + 8; |
| 543 | numSyms = xkb_state_key_get_syms(_glfw.wl.xkb.state, code, &syms); |
| 544 | |
| 545 | if (numSyms == 1) |
| 546 | { |
| 547 | #ifdef HAVE_XKBCOMMON_COMPOSE_H |
| 548 | sym = composeSymbol(syms[0]); |
| 549 | #else |
| 550 | sym = syms[0]; |
| 551 | #endif |
| 552 | cp = _glfwKeySym2Unicode(sym); |
| 553 | if (cp != -1) |
| 554 | { |
| 555 | const int mods = _glfw.wl.xkb.modifiers; |
| 556 | const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT)); |
| 557 | _glfwInputChar(window, cp, mods, plain); |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | return xkb_keymap_key_repeats(_glfw.wl.xkb.keymap, syms[0]); |
| 562 | } |
| 563 | |
| 564 | static void keyboardHandleKey(void* data, |
| 565 | struct wl_keyboard* keyboard, |
no test coverage detected