mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 08:36:42 +00:00
Fix a couple of keyboard/mouse capturing issues
This commit is contained in:
parent
bf048a6b1d
commit
15920cd69b
@ -31,6 +31,7 @@ void MoonlightInstance::DidLockMouse(int32_t result) {
|
||||
|
||||
void MoonlightInstance::MouseLockLost() {
|
||||
m_MouseLocked = false;
|
||||
m_KeyModifiers = 0;
|
||||
}
|
||||
|
||||
void MoonlightInstance::UpdateModifiers(PP_InputEvent_Type eventType, short keyCode) {
|
||||
@ -127,6 +128,12 @@ bool MoonlightInstance::HandleInputEvent(const pp::InputEvent& event) {
|
||||
// Update modifier state before sending the key event
|
||||
UpdateModifiers(event.GetType(), keyboardEvent.GetKeyCode());
|
||||
|
||||
if (m_KeyModifiers == (MODIFIER_ALT | MODIFIER_CTRL | MODIFIER_SHIFT)) {
|
||||
g_Instance->UnlockMouse();
|
||||
m_MouseLocked = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
LiSendKeyboardEvent(KEY_PREFIX << 8 | keyboardEvent.GetKeyCode(),
|
||||
KEY_ACTION_DOWN, m_KeyModifiers);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user