Set KeyEvent modifier bits from SDL key event.
This commit is contained in:
parent
b999a77d0f
commit
1df47d3ed5
Notes:
sideshowbarker
2024-07-19 18:49:46 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1df47d3ed53
1 changed files with 4 additions and 0 deletions
|
@ -68,6 +68,10 @@ void EventLoopSDL::handleKeyEvent(Event::Type type, const SDL_KeyboardEvent& sdl
|
|||
keyEvent->m_text = buf;
|
||||
}
|
||||
|
||||
keyEvent->m_shift = sdlKey.keysym.mod & KMOD_SHIFT;
|
||||
keyEvent->m_ctrl = sdlKey.keysym.mod & KMOD_CTRL;
|
||||
keyEvent->m_alt = sdlKey.keysym.mod & KMOD_ALT;
|
||||
|
||||
postEvent(&WindowManager::the(), std::move(keyEvent));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue