D23766: FakeInput: add support for keyboard key press and release

Jan Grulich noreply at phabricator.kde.org
Sat Sep 7 12:16:17 BST 2019


jgrulich added inline comments.

INLINE COMMENTS

> jgrulich wrote in fakeinput.h:222
> I will need a little bit of help to understand what type of key event should be used and I don't remember where I got the information it expects codes defined from linux/input-event-codes.h (I copied it from the previous review)
> 
> Anyway, for the remote desktop portal, we will need to support both keysym  and keycodes [1].
> 
> [1] - https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.impl.portal.RemoteDesktop.xml#L226

Ok, I think I understand now.

KWin uses KeyboardInputRedirection::processKey(uint32_t key, InputRedirection::KeyboardKeyState state, uint32_t time, LibInput::Device *device), where Xkb::updateKey(uint32_t key, InputRedirection::KeyboardKeyState state) is called. The second method expects a key code as  defined in linux/input-event-codes.h and passing **key + 8** to xkb_state_update_key() call.

So I think we want to keep it this way and accept key codes as defined in linux/input-event-codes.h so we can directly bind this in KWin to a key press event.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D23766

To: jgrulich, davidedmundson, apol, #plasma, romangg
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190907/75a3af41/attachment.html>


More information about the Kde-frameworks-devel mailing list