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

Commit 63c9ac69 authored by Josep del Río's avatar Josep del Río Committed by Android (Google) Code Review
Browse files

Merge "Replace Action+Grave with Action+Escape" into main

parents e9d97930 5d858ee5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -500,7 +500,7 @@ key PLUS {

key ESCAPE {
    base:                               none
    alt, meta:                          fallback HOME
    alt:                                fallback HOME
    ctrl:                               fallback MENU
}

+2 −2
Original line number Diff line number Diff line
@@ -493,11 +493,11 @@ public final class KeyboardShortcutListSearch {
                        Arrays.asList(
                                Pair.create(KeyEvent.KEYCODE_SLASH, KeyEvent.META_META_ON))),
                /* Back: go back to previous state (back button) */
                /* Meta + Grave, Meta + backspace, Meta + left arrow */
                /* Meta + Escape, Meta + Grave, Meta + backspace, Meta + left arrow */
                new ShortcutKeyGroupMultiMappingInfo(
                        context.getString(R.string.group_system_go_back),
                        Arrays.asList(
                                Pair.create(KeyEvent.KEYCODE_GRAVE, KeyEvent.META_META_ON),
                                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))),
                /* Access home screen: Meta + H, Meta + Enter */
+1 −1
Original line number Diff line number Diff line
@@ -3472,7 +3472,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                }
                break;
            case KeyEvent.KEYCODE_DEL:
            case KeyEvent.KEYCODE_GRAVE:
            case KeyEvent.KEYCODE_ESCAPE:
                if (firstDown && event.isMetaPressed()) {
                    logKeyboardSystemsEvent(event, KeyboardLogEvent.BACK);
                    injectBackGesture(event.getDownTime());
+5 −5
Original line number Diff line number Diff line
@@ -30,13 +30,13 @@ import androidx.test.filters.MediumTest;
import com.android.internal.annotations.Keep;
import com.android.server.input.KeyboardMetricsCollector.KeyboardLogEvent;

import junitparams.JUnitParamsRunner;
import junitparams.Parameters;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import junitparams.JUnitParamsRunner;
import junitparams.Parameters;

@Presubmit
@MediumTest
@RunWith(JUnitParamsRunner.class)
@@ -71,8 +71,8 @@ public class ShortcutLoggingTests extends ShortcutKeyTestBase {
                        KeyboardLogEvent.RECENT_APPS, KeyEvent.KEYCODE_TAB, ALT_ON},
                {"BACK key -> Go back", new int[]{KeyEvent.KEYCODE_BACK}, KeyboardLogEvent.BACK,
                        KeyEvent.KEYCODE_BACK, 0},
                {"Meta + `(grave) -> Go back", new int[]{META_KEY, KeyEvent.KEYCODE_GRAVE},
                        KeyboardLogEvent.BACK, KeyEvent.KEYCODE_GRAVE, META_ON},
                {"Meta + Escape -> Go back", new int[]{META_KEY, KeyEvent.KEYCODE_ESCAPE},
                        KeyboardLogEvent.BACK, KeyEvent.KEYCODE_ESCAPE, META_ON},
                {"Meta + Left arrow -> Go back", new int[]{META_KEY, KeyEvent.KEYCODE_DPAD_LEFT},
                        KeyboardLogEvent.BACK, KeyEvent.KEYCODE_DPAD_LEFT, META_ON},
                {"Meta + Del -> Go back", new int[]{META_KEY, KeyEvent.KEYCODE_DEL},