InputRedirection for keyboard events

Desktop / KDE / KDE Workspace - Martin Gräßlin [kde.org] - 18 March 2014 03:00 EDT

Major new functionality is xkbcommon support. InputRedirection holds an instance to a small wrapper class which has the xkb context, keymap and state. The keymap is initialied from the file descriptor we get from the Wayland backend.

InputRedirection uses this to translate the keycodes into keysymbols and to QString and to track the modifiers as provided by the Qt::KeybordModifiers flags.

This provides us enough information for internal usage (e.g. pass through effects if they have "grabbed" the keyboard).

If KWin doesn't filter out the key events, it passes them on to the currently active Client respectively an unmanaged on top of the stack. This needs still some improvement (not each unmanaged should get the event). The Client/Unmnaged still uses xtest extension to send the key events to the window. So keylogging is still possible.

4afe7c4 InputRedirection for keyboard events
kwin/CMakeLists.txt | 5 ++
kwin/client.cpp | 10 +++
kwin/client.h | 1 +
kwin/config-kwin.h.cmake | 1 +
kwin/effects.cpp | 12 ++-
kwin/input.cpp | 183 +++++++++++++++++++++++++++++++++++++++++++++-
kwin/input.h | 58 +++++++++++++++
kwin/toplevel.cpp | 6 ++
kwin/toplevel.h | 1 +
kwin/unmanaged.cpp | 10 +++
kwin/unmanaged.h | 1 +
kwin/wayland_backend.cpp | 19 ++---
12 files changed, 286 insertions(+), 21 deletions(-)

Upstream: quickgit.kde.org


  • Share