diff options
| author | 2023-11-29 19:15:20 +0000 | |
|---|---|---|
| committer | 2023-11-29 19:15:20 +0000 | |
| commit | 63c9ac69eceb1a4936d96d94bc7bb5b6beeea69a (patch) | |
| tree | 3de43c2d64c4f9bf0c160e354cb5dc552b5b3779 | |
| parent | e9d979309b7a8b6b49db157e546b8dbb36c5e9de (diff) | |
| parent | 5d858ee59bc35368e92fc62256f5e3219804a441 (diff) | |
Merge "Replace Action+Grave with Action+Escape" into main
4 files changed, 9 insertions, 9 deletions
diff --git a/data/keyboards/Generic.kcm b/data/keyboards/Generic.kcm index 1048742adb70..e7e174064849 100644 --- a/data/keyboards/Generic.kcm +++ b/data/keyboards/Generic.kcm @@ -500,7 +500,7 @@ key PLUS { key ESCAPE { base: none - alt, meta: fallback HOME + alt: fallback HOME ctrl: fallback MENU } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java index c1a630f48232..909cff37b67d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java @@ -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 */ diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index b33c54f886af..86eafe60b62c 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -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()); diff --git a/services/tests/wmtests/src/com/android/server/policy/ShortcutLoggingTests.java b/services/tests/wmtests/src/com/android/server/policy/ShortcutLoggingTests.java index 360fdf3ae3f7..2d7f044baf18 100644 --- a/services/tests/wmtests/src/com/android/server/policy/ShortcutLoggingTests.java +++ b/services/tests/wmtests/src/com/android/server/policy/ShortcutLoggingTests.java @@ -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}, |