Add error logging for keyboard input

This commit is contained in:
Vasily
2019-05-25 18:49:42 +02:00
committed by username223
parent 6009fcbfd0
commit 3f8f757ead
4 changed files with 3 additions and 5 deletions
+2 -3
View File
@@ -50,7 +50,7 @@ std::optional<Token> getFunctionNumber( const char& character ) noexcept
return Token::KEY_F9;
default:
// LOG incorrect character
LOG( INFO ) << "Unknown function key number: " << character;
return std::nullopt;
}
}
@@ -147,7 +147,6 @@ std::optional<Token> checkIfLegalCapitalLiteral( std::string input ) noexcept
return Token::KEY_ENTER;
}
// LOG incorrect character
return std::nullopt;
}
@@ -176,7 +175,7 @@ std::vector<Token>
if ( !isupper( *ch ) || isspace( *ch ) )
{
// LOG incorrect character
LOG( INFO ) << "Unknown character found in sequence: " << ch;
continue;
}
// Everything below is upper case
+1
View File
@@ -3,6 +3,7 @@
#include <vector>
#include <cctype>
#include <optional>
#include <easylogging++.h>
enum class Token
{
-1
View File
@@ -86,7 +86,6 @@ unsigned int tokenToKeyCode( const Token token, Display* const display )
return XK_Super_L;
default:
// LOG incorrect symbol
return 0;
}
}
-1
View File
@@ -86,7 +86,6 @@ WORD convertToVirtualKeycode( const Token token )
return VK_LWIN;
default:
// LOG incorrect symbol
return 0;
}
}