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
+10 -1
View File
@@ -5,7 +5,7 @@
WORD convertToVirtualKeycode( const Token token )
{
if ( isalnum( static_cast<int>( token ) ) )
if ( isLiteralKey( token ) )
{
return static_cast<WORD>( VkKeyScan( static_cast<int>( token ) ) );
}
@@ -178,6 +178,15 @@ void sendTokensAsInput( const std::vector<Token> tokens )
}
}
if ( !heldInputs.empty() )
{
for ( const auto& h : heldInputs )
{
inputs.push_back( createInputStruct( convertToVirtualKeycode( h ),
KeyStatus::Up ) );
}
}
sendKeyboardInputRaw( inputs );
// send inputs
}