From 41429073763bc6c81b6135aed4323f2c2204cc49 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 30 Dec 2023 19:50:36 -0600 Subject: [PATCH] Don't consume special key combos that we don't handle --- app/src/main/java/com/limelight/Game.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/limelight/Game.java b/app/src/main/java/com/limelight/Game.java index bdd9548a..4ce91b3f 100644 --- a/app/src/main/java/com/limelight/Game.java +++ b/app/src/main/java/com/limelight/Game.java @@ -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