mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-01 07:15:57 +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)) ==
|
||||
(KeyboardPacket.MODIFIER_CTRL | KeyboardPacket.MODIFIER_ALT | KeyboardPacket.MODIFIER_SHIFT) &&
|
||||
(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
|
||||
specialKeyCode = androidKeyCode;
|
||||
waitingForAllModifiersUp = true;
|
||||
return true;
|
||||
switch (androidKeyCode) {
|
||||
case KeyEvent.KEYCODE_Z:
|
||||
case KeyEvent.KEYCODE_Q:
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user