Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5850e60c authored by Vaibhav Devmurari's avatar Vaibhav Devmurari
Browse files

Remove Meta+Backspace=Back shortcut properly

Previously this key combination was removed from the user facing
elements like the "new shortcut helper" UI but wasn't removed from
old shortcut helper and the key gesture controller.

Originally removed due to low usage and ergonomic difficulty with
the shortcut: b/394599430

Bug: 394599430
Bug: 394600915
Test: atest InputTests
Flag: EXEMPT bugfix
Change-Id: I2968c76bea7fe9d85c2b6f08d7277933f5ee35db
parent 30ca69ca
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -566,12 +566,11 @@ public final class KeyboardShortcutListSearch {
                        Arrays.asList(
                                Pair.create(KeyEvent.KEYCODE_TAB, KeyEvent.META_META_ON))),
                /* Back: go back to previous state (back button) */
                /* Meta + Escape, Meta + backspace, Meta + left arrow */
                /* Meta + Escape, Meta + left arrow */
                new ShortcutKeyGroupMultiMappingInfo(
                        context.getString(R.string.group_system_go_back),
                        Arrays.asList(
                                Pair.create(KeyEvent.KEYCODE_ESCAPE, KeyEvent.META_META_ON),
                                Pair.create(KeyEvent.KEYCODE_DEL, KeyEvent.META_META_ON),
                                Pair.create(KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.META_META_ON))),
                /* Take a full screenshot: Meta + S */
                new ShortcutKeyGroupMultiMappingInfo(
+0 −5
Original line number Diff line number Diff line
@@ -150,11 +150,6 @@ final class InputGestureManager {
                        KeyEvent.META_META_ON,
                        KeyGestureEvent.KEY_GESTURE_TYPE_TAKE_SCREENSHOT
                ),
                createKeyGesture(
                        KeyEvent.KEYCODE_DEL,
                        KeyEvent.META_META_ON,
                        KeyGestureEvent.KEY_GESTURE_TYPE_BACK
                ),
                createKeyGesture(
                        KeyEvent.KEYCODE_ESCAPE,
                        KeyEvent.META_META_ON,
+1 −1
Original line number Diff line number Diff line
@@ -3818,7 +3818,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                        return true;
                    }
                }
                // fall through
                break;
            case KeyEvent.KEYCODE_ESCAPE:
                if (firstDown && event.isMetaPressed()) {
                    notifyKeyGestureCompleted(event,
+0 −2
Original line number Diff line number Diff line
@@ -150,8 +150,6 @@ public class KeyGestureEventTests extends ShortcutKeyTestBase {
                {"Meta + Left arrow -> Go back", new int[]{META_KEY, KeyEvent.KEYCODE_DPAD_LEFT},
                        KeyGestureEvent.KEY_GESTURE_TYPE_BACK, KeyEvent.KEYCODE_DPAD_LEFT,
                        META_ON},
                {"Meta + Del -> Go back", new int[]{META_KEY, KeyEvent.KEYCODE_DEL},
                        KeyGestureEvent.KEY_GESTURE_TYPE_BACK, KeyEvent.KEYCODE_DEL, META_ON},
                {"APP_SWITCH key -> Open App switcher", new int[]{KeyEvent.KEYCODE_APP_SWITCH},
                        KeyGestureEvent.KEY_GESTURE_TYPE_APP_SWITCH,
                        KeyEvent.KEYCODE_APP_SWITCH, 0},
+0 −8
Original line number Diff line number Diff line
@@ -381,14 +381,6 @@ class KeyGestureControllerTests {
                KeyEvent.META_META_ON,
                intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE)
            ),
            TestData(
                "META + DEL -> Back",
                intArrayOf(KeyEvent.KEYCODE_META_LEFT, KeyEvent.KEYCODE_DEL),
                KeyGestureEvent.KEY_GESTURE_TYPE_BACK,
                intArrayOf(KeyEvent.KEYCODE_DEL),
                KeyEvent.META_META_ON,
                intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE)
            ),
            TestData(
                "META + ESC -> Back",
                intArrayOf(KeyEvent.KEYCODE_META_LEFT, KeyEvent.KEYCODE_ESCAPE),