mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-12 03:24:00 +00:00
Reorganize a couple mouse and keyboard functions
This commit is contained in:
@@ -478,3 +478,20 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event)
|
||||
modifiers,
|
||||
shouldNotConvertToScanCodeOnServer ? SS_KBE_FLAG_NON_NORMALIZED : 0);
|
||||
}
|
||||
|
||||
void SdlInputHandler::raiseAllKeys()
|
||||
{
|
||||
if (m_KeysDown.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Raising %d keys",
|
||||
(int)m_KeysDown.count());
|
||||
|
||||
for (auto keyDown : std::as_const(m_KeysDown)) {
|
||||
LiSendKeyboardEvent(keyDown, KEY_ACTION_UP, 0);
|
||||
}
|
||||
|
||||
m_KeysDown.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user