mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
Set KeyEvent modifier bits from SDL key event.
This commit is contained in:
parent
b999a77d0f
commit
1df47d3ed5
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
Add a link
Reference in a new issue