mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 02:25:59 +01:00
parent
daf5fad190
commit
cd942ad12d
1 changed files with 2 additions and 2 deletions
|
@ -32,13 +32,13 @@ CKeyboard::CKeyboard(SP<Aquamarine::IKeyboard> keeb) : keyboard(keeb) {
|
||||||
listeners.key = keeb->events.key.registerListener([this](std::any d) {
|
listeners.key = keeb->events.key.registerListener([this](std::any d) {
|
||||||
auto E = std::any_cast<Aquamarine::IKeyboard::SKeyEvent>(d);
|
auto E = std::any_cast<Aquamarine::IKeyboard::SKeyEvent>(d);
|
||||||
|
|
||||||
updateXkbStateWithKey(E.key + 8, E.pressed);
|
|
||||||
|
|
||||||
keyboardEvents.key.emit(SKeyEvent{
|
keyboardEvents.key.emit(SKeyEvent{
|
||||||
.timeMs = E.timeMs,
|
.timeMs = E.timeMs,
|
||||||
.keycode = E.key,
|
.keycode = E.key,
|
||||||
.state = E.pressed ? WL_KEYBOARD_KEY_STATE_PRESSED : WL_KEYBOARD_KEY_STATE_RELEASED,
|
.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) {
|
listeners.modifiers = keeb->events.modifiers.registerListener([this](std::any d) {
|
||||||
|
|
Loading…
Reference in a new issue