mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-02 15:56:24 +00:00
Don't consume special key combos that we don't handle
This commit is contained in:
parent
e63dc9a93b
commit
4142907376
@ -1300,10 +1300,20 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
else if ((modifierFlags & (KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_ALT | KeyboardPacket.MODIFIER_SHIFT)) ==
|
else if ((modifierFlags & (KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_ALT | KeyboardPacket.MODIFIER_SHIFT)) ==
|
||||||
(KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_ALT | KeyboardPacket.MODIFIER_SHIFT) &&
|
(KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_ALT | KeyboardPacket.MODIFIER_SHIFT) &&
|
||||||
(down && nonModifierKeyCode != KeyEvent.KEYCODE_UNKNOWN)) {
|
(down && nonModifierKeyCode != KeyEvent.KEYCODE_UNKNOWN)) {
|
||||||
// Remember that a special key combo was activated, so we can consume all key events until the modifiers come up
|
switch (androidKeyCode) {
|
||||||
specialKeyCode = androidKeyCode;
|
case KeyEvent.KEYCODE_Z:
|
||||||
waitingForAllModifiersUp = true;
|
case KeyEvent.KEYCODE_Q:
|
||||||
return true;
|
case KeyEvent.KEYCODE_C:
|
||||||
|
// Remember that a special key combo was activated, so we can consume all key
|
||||||
|
// events until the modifiers come up
|
||||||
|
specialKeyCode = androidKeyCode;
|
||||||
|
waitingForAllModifiersUp = true;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// This isn't a special combo that we consume on the client side
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not a special combo
|
// Not a special combo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user