Fix keyboard input implementation error and replace old system

This commit is contained in:
Vasily
2019-05-25 18:49:42 +02:00
committed by username223
parent d48f74b314
commit 55a3830787
9 changed files with 164 additions and 528 deletions
+9 -1
View File
@@ -5,7 +5,7 @@
unsigned int tokenToKeyCode( const Token token, Display* const display )
{
if ( isalnum( static_cast<int>( token ) ) )
if ( isLiteralKey( token ) )
{
return XKeysymToKeycode( display, static_cast<KeySym>( token ) );
}
@@ -137,6 +137,14 @@ void sendTokensAsInput( const std::vector<Token> tokens )
}
}
if ( !heldInputs.empty() )
{
for ( const auto& h : heldInputs )
{
sendKeyPress( h, KeyStatus::Up, display );
}
}
XSync( display, False );
XTestGrabControl( display, False );
}