diff options
author | Jaeyoon Jung <jaeyoon.jung@lge.com> | 2021-03-25 07:50:25 +0900 |
---|---|---|
committer | Jaeyoon Jung <jaeyoon.jung@lge.com> | 2021-04-13 15:44:18 +0900 |
commit | befa2e11a87876cd3da8336370ae8f7f2fed004c (patch) | |
tree | 30fba592e9c5d7334462acf2fb0dad0b241f6f46 /src/client/qwaylandinputdevice_p.h | |
parent | 7e11da314c3d4678274ae7e4f58721e3e729e501 (diff) |
Client: Allow inheritance of key translation
Use a virtual method keysymToQtKey for Qt key code translation, so that
it can be customized by a descendant class if needed.
Change-Id: I3b48346a63e2c6f134230fe15279faa95abe11a0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/client/qwaylandinputdevice_p.h')
-rw-r--r-- | src/client/qwaylandinputdevice_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h index b23de1f42..4a216bc43 100644 --- a/src/client/qwaylandinputdevice_p.h +++ b/src/client/qwaylandinputdevice_p.h @@ -263,6 +263,12 @@ public: struct ::wl_keyboard *wl_keyboard() { return QtWayland::wl_keyboard::object(); } +#if QT_CONFIG(xkbcommon) + virtual int keysymToQtKey(xkb_keysym_t keysym, Qt::KeyboardModifiers modifiers, xkb_state *state, xkb_keycode_t code) { + return QXkbCommon::keysymToQtKey(keysym, modifiers, state, code); + } +#endif + private slots: void handleFocusDestroyed(); void handleFocusLost(); |