From 918ac8b27ea58cd7e4b58432cb712b453356ffb9 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 28 Feb 2024 13:20:32 +0000 Subject: [PATCH] xwayland: Use correct key for key release events When a key is pressed the string that should be used in the key event changes depending on the xkb updated state for composed keys. The key itself should be not be affected. --- src/keyboard_input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/keyboard_input.cpp b/src/keyboard_input.cpp index 9dbb01bccb..c34b2c8780 100644 --- a/src/keyboard_input.cpp +++ b/src/keyboard_input.cpp @@ -244,14 +244,14 @@ void KeyboardInputRedirection::processKey(uint32_t key, InputRedirection::Keyboa m_xkb->updateKey(key, state); } - const xkb_keysym_t keySym = m_xkb->currentKeysym(); + const xkb_keysym_t keySym = m_xkb->toKeysym(key); const Qt::KeyboardModifiers globalShortcutsModifiers = m_xkb->modifiersRelevantForGlobalShortcuts(key); KeyEvent event(type, m_xkb->toQtKey(keySym, key, globalShortcutsModifiers ? Qt::ControlModifier : Qt::KeyboardModifiers()), m_xkb->modifiers(), key, keySym, - m_xkb->toString(keySym), + m_xkb->toString(m_xkb->currentKeysym()), autoRepeat, time, device);