From 97009aa39afd62008ec6a41a3a4faa1813176544 Mon Sep 17 00:00:00 2001 From: Vasily Date: Fri, 14 Jun 2019 22:09:09 +0200 Subject: [PATCH] Convert KeySym to KeyCode Previously KeySyms were sent when KeyCodes should have been sent. --- src/keyboard_input/input_sender_X11.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/keyboard_input/input_sender_X11.cpp b/src/keyboard_input/input_sender_X11.cpp index c510997..be6cf95 100644 --- a/src/keyboard_input/input_sender_X11.cpp +++ b/src/keyboard_input/input_sender_X11.cpp @@ -3,7 +3,7 @@ #include #include -unsigned int tokenToKeyCode( const Token token ) +unsigned int tokenToKeySym( const Token token ) { switch ( token ) { @@ -175,7 +175,10 @@ void sendKeyPress( const Token token, LOG( INFO ) << "Status:"; LOG( INFO ) << static_cast( status ); - XTestFakeKeyEvent( display, tokenToKeyCode( token ), keyDown, 0 ); + XTestFakeKeyEvent( display, + XKeysymToKeycode( display, tokenToKeySym( token ) ), + keyDown, + 0 ); } void sendTokensAsInput( const std::vector tokens )