Loading packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/SystemShortcutsSource.kt +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.res.Resources import android.hardware.input.InputManager import android.hardware.input.KeyGlyphMap import android.view.KeyEvent.KEYCODE_BACK import android.view.KeyEvent.KEYCODE_DEL import android.view.KeyEvent.KEYCODE_DPAD_LEFT import android.view.KeyEvent.KEYCODE_ESCAPE import android.view.KeyEvent.KEYCODE_H Loading Loading @@ -158,8 +159,14 @@ constructor(@Main private val resources: Resources, private val inputManager: In } ) // Back: go back to previous state (back button) // - Meta + Backspace OR // - Meta + Escape OR // - Meta + Left arrow add( shortcutInfo(resources.getString(R.string.group_system_go_back)) { command(META_META_ON, KEYCODE_DEL) } ) add( shortcutInfo(resources.getString(R.string.group_system_go_back)) { command(META_META_ON, KEYCODE_ESCAPE) Loading packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java +2 −1 Original line number Diff line number Diff line Loading @@ -568,10 +568,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 + left arrow */ /* Meta + Backspace, Meta + Escape, Meta + left arrow */ new ShortcutKeyGroupMultiMappingInfo( context.getString(R.string.group_system_go_back), Arrays.asList( Pair.create(KeyEvent.KEYCODE_DEL, KeyEvent.META_META_ON), Pair.create(KeyEvent.KEYCODE_ESCAPE, KeyEvent.META_META_ON), Pair.create(KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.META_META_ON))), /* Take a full screenshot: Meta + S */ Loading services/core/java/com/android/server/input/InputGestureManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,12 @@ final class InputGestureManager { KeyGestureEvent.KEY_GESTURE_TYPE_TAKE_SCREENSHOT, /* allowCaptureByFocusedWindow = */true ), createKeyGesture( KeyEvent.KEYCODE_DEL, KeyEvent.META_META_ON, KeyGestureEvent.KEY_GESTURE_TYPE_BACK, /* allowCaptureByFocusedWindow = */true ), createKeyGesture( KeyEvent.KEYCODE_ESCAPE, KeyEvent.META_META_ON, Loading Loading
packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/SystemShortcutsSource.kt +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.res.Resources import android.hardware.input.InputManager import android.hardware.input.KeyGlyphMap import android.view.KeyEvent.KEYCODE_BACK import android.view.KeyEvent.KEYCODE_DEL import android.view.KeyEvent.KEYCODE_DPAD_LEFT import android.view.KeyEvent.KEYCODE_ESCAPE import android.view.KeyEvent.KEYCODE_H Loading Loading @@ -158,8 +159,14 @@ constructor(@Main private val resources: Resources, private val inputManager: In } ) // Back: go back to previous state (back button) // - Meta + Backspace OR // - Meta + Escape OR // - Meta + Left arrow add( shortcutInfo(resources.getString(R.string.group_system_go_back)) { command(META_META_ON, KEYCODE_DEL) } ) add( shortcutInfo(resources.getString(R.string.group_system_go_back)) { command(META_META_ON, KEYCODE_ESCAPE) Loading
packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java +2 −1 Original line number Diff line number Diff line Loading @@ -568,10 +568,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 + left arrow */ /* Meta + Backspace, Meta + Escape, Meta + left arrow */ new ShortcutKeyGroupMultiMappingInfo( context.getString(R.string.group_system_go_back), Arrays.asList( Pair.create(KeyEvent.KEYCODE_DEL, KeyEvent.META_META_ON), Pair.create(KeyEvent.KEYCODE_ESCAPE, KeyEvent.META_META_ON), Pair.create(KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.META_META_ON))), /* Take a full screenshot: Meta + S */ Loading
services/core/java/com/android/server/input/InputGestureManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,12 @@ final class InputGestureManager { KeyGestureEvent.KEY_GESTURE_TYPE_TAKE_SCREENSHOT, /* allowCaptureByFocusedWindow = */true ), createKeyGesture( KeyEvent.KEYCODE_DEL, KeyEvent.META_META_ON, KeyGestureEvent.KEY_GESTURE_TYPE_BACK, /* allowCaptureByFocusedWindow = */true ), createKeyGesture( KeyEvent.KEYCODE_ESCAPE, KeyEvent.META_META_ON, Loading