Add error logging for keyboard input
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <vector>
|
||||
#include <cctype>
|
||||
#include <optional>
|
||||
#include <easylogging++.h>
|
||||
|
||||
enum class Token
|
||||
{
|
||||
|
||||
@@ -86,7 +86,6 @@ unsigned int tokenToKeyCode( const Token token, Display* const display )
|
||||
return XK_Super_L;
|
||||
|
||||
default:
|
||||
// LOG incorrect symbol
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,6 @@ WORD convertToVirtualKeycode( const Token token )
|
||||
return VK_LWIN;
|
||||
|
||||
default:
|
||||
// LOG incorrect symbol
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user