aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/devices/IKeyboard.cpp
diff options
context:
space:
mode:
authorMahouShoujoMivutilde <[email protected]>2024-07-27 18:43:45 +0300
committerGitHub <[email protected]>2024-07-27 16:43:45 +0100
commit84227eb587688596b63a5b48848d32083d9680cf (patch)
tree1ad1696696d12ada801b5a3fe785f8e474b4e326 /src/devices/IKeyboard.cpp
parentdaed75219fa7b4ec345337ec99f816e94bda338c (diff)
downloadHyprland-84227eb587688596b63a5b48848d32083d9680cf.tar.gz
Hyprland-84227eb587688596b63a5b48848d32083d9680cf.zip
input: Fix `hyprctl switchxkblayout` not actually changing layout (#7070)
Emits `SModifiersEvent` in `updateModifiers()` Before the patch: Changing layout with `hyprctl switchxkblayout ...` results in: * active keymap in `hyprctl devices` is changed * no event * no layout is actually changed UNTIL you press one of the mod keys (Alt | Shift | Super | Ctrl) After: * active keymap in `hyprctl devices` changed * activelayout IPC event emitted * layout is changed This fixes https://github.com/hyprwm/Hyprland/issues/7044
Diffstat (limited to 'src/devices/IKeyboard.cpp')
-rw-r--r--src/devices/IKeyboard.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/devices/IKeyboard.cpp b/src/devices/IKeyboard.cpp
index 09a18477..e3517bf1 100644
--- a/src/devices/IKeyboard.cpp
+++ b/src/devices/IKeyboard.cpp
@@ -325,6 +325,13 @@ void IKeyboard::updateModifiers(uint32_t depressed, uint32_t latched, uint32_t l
if (!updateModifiersState())
return;
+ keyboardEvents.modifiers.emit(SModifiersEvent{
+ .depressed = modifiersState.depressed,
+ .latched = modifiersState.latched,
+ .locked = modifiersState.locked,
+ .group = modifiersState.group,
+ });
+
updateLEDs();
}