diff options
author | Vaxry <[email protected]> | 2024-07-25 13:10:53 +0200 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-07-25 13:10:53 +0200 |
commit | cd942ad12d9d2030963e3dd5fbfe2d181013c750 (patch) | |
tree | f697763460d906e1d05e5a32580dd992e13742c2 | |
parent | daf5fad19034def8062acfd32e66bea78c62aaff (diff) | |
download | Hyprland-cd942ad12d9d2030963e3dd5fbfe2d181013c750.tar.gz Hyprland-cd942ad12d9d2030963e3dd5fbfe2d181013c750.zip |
keyboard: update xkb state after key event
fixes #6946
-rw-r--r-- | src/devices/Keyboard.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/Keyboard.cpp b/src/devices/Keyboard.cpp index ae28c07d..0a8f6b57 100644 --- a/src/devices/Keyboard.cpp +++ b/src/devices/Keyboard.cpp @@ -32,13 +32,13 @@ CKeyboard::CKeyboard(SP<Aquamarine::IKeyboard> keeb) : keyboard(keeb) { listeners.key = keeb->events.key.registerListener([this](std::any d) { auto E = std::any_cast<Aquamarine::IKeyboard::SKeyEvent>(d); - updateXkbStateWithKey(E.key + 8, E.pressed); - keyboardEvents.key.emit(SKeyEvent{ .timeMs = E.timeMs, .keycode = E.key, .state = E.pressed ? WL_KEYBOARD_KEY_STATE_PRESSED : WL_KEYBOARD_KEY_STATE_RELEASED, }); + + updateXkbStateWithKey(E.key + 8, E.pressed); }); listeners.modifiers = keeb->events.modifiers.registerListener([this](std::any d) { |