Fix keyboard input implementation error and replace old system
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user