Convert KeySym to KeyCode

Previously KeySyms were sent when KeyCodes should have been sent.
This commit is contained in:
Vasily
2019-06-15 10:00:46 +02:00
committed by username223
parent e2f41fce37
commit 97009aa39a
+5 -2
View File
@@ -3,7 +3,7 @@
#include <X11/Intrinsic.h>
#include <X11/extensions/XTest.h>
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<int>( status );
XTestFakeKeyEvent( display, tokenToKeyCode( token ), keyDown, 0 );
XTestFakeKeyEvent( display,
XKeysymToKeycode( display, tokenToKeySym( token ) ),
keyDown,
0 );
}
void sendTokensAsInput( const std::vector<Token> tokens )