Convert KeySym to KeyCode
Previously KeySyms were sent when KeyCodes should have been sent.
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user