mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +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() {
|
void MoonlightInstance::MouseLockLost() {
|
||||||
m_MouseLocked = false;
|
m_MouseLocked = false;
|
||||||
|
m_KeyModifiers = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoonlightInstance::UpdateModifiers(PP_InputEvent_Type eventType, short keyCode) {
|
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
|
// Update modifier state before sending the key event
|
||||||
UpdateModifiers(event.GetType(), keyboardEvent.GetKeyCode());
|
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(),
|
LiSendKeyboardEvent(KEY_PREFIX << 8 | keyboardEvent.GetKeyCode(),
|
||||||
KEY_ACTION_DOWN, m_KeyModifiers);
|
KEY_ACTION_DOWN, m_KeyModifiers);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user