aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-07-25 13:10:53 +0200
committerVaxry <[email protected]>2024-07-25 13:10:53 +0200
commitcd942ad12d9d2030963e3dd5fbfe2d181013c750 (patch)
treef697763460d906e1d05e5a32580dd992e13742c2
parentdaf5fad19034def8062acfd32e66bea78c62aaff (diff)
downloadHyprland-cd942ad12d9d2030963e3dd5fbfe2d181013c750.tar.gz
Hyprland-cd942ad12d9d2030963e3dd5fbfe2d181013c750.zip
keyboard: update xkb state after key event
fixes #6946
-rw-r--r--src/devices/Keyboard.cpp4
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) {