mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
Move keyboard tests to keyboard handler
This commit is contained in:
@ -186,21 +186,17 @@ void InputHandler::fetchEvents()
|
||||
|
||||
bool InputHandler::isKeyboardCtrlDown() const
|
||||
{
|
||||
#ifdef VCMI_MAC
|
||||
return SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_LGUI] || SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_RGUI];
|
||||
#else
|
||||
return SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_LCTRL] || SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_RCTRL];
|
||||
#endif
|
||||
return keyboardHandler->isKeyboardCtrlDown();
|
||||
}
|
||||
|
||||
bool InputHandler::isKeyboardAltDown() const
|
||||
{
|
||||
return SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_LALT] || SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_RALT];
|
||||
return keyboardHandler->isKeyboardAltDown();
|
||||
}
|
||||
|
||||
bool InputHandler::isKeyboardShiftDown() const
|
||||
{
|
||||
return SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_LSHIFT] || SDL_GetKeyboardState(nullptr)[SDL_SCANCODE_RSHIFT];
|
||||
return keyboardHandler->isKeyboardShiftDown();
|
||||
}
|
||||
|
||||
void InputHandler::moveCursorPosition(const Point & distance)
|
||||
|
Reference in New Issue
Block a user