Loading core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -50891,6 +50891,10 @@ package android.view { field public static final int KEYCODE_LAST_CHANNEL = 229; // 0xe5 field public static final int KEYCODE_LEFT_BRACKET = 71; // 0x47 field public static final int KEYCODE_M = 41; // 0x29 field public static final int KEYCODE_MACRO_1 = 313; // 0x139 field public static final int KEYCODE_MACRO_2 = 314; // 0x13a field public static final int KEYCODE_MACRO_3 = 315; // 0x13b field public static final int KEYCODE_MACRO_4 = 316; // 0x13c field public static final int KEYCODE_MANNER_MODE = 205; // 0xcd field public static final int KEYCODE_MEDIA_AUDIO_TRACK = 222; // 0xde field public static final int KEYCODE_MEDIA_CLOSE = 128; // 0x80 core/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3310,7 +3310,7 @@ package android.view { method public static String actionToString(int); method public final void setDisplayId(int); field public static final int FLAG_IS_ACCESSIBILITY_EVENT = 2048; // 0x800 field public static final int LAST_KEYCODE = 312; // 0x138 field public static final int LAST_KEYCODE = 316; // 0x13c } public final class KeyboardShortcutGroup implements android.os.Parcelable { Loading core/java/android/view/KeyEvent.java +26 −1 Original line number Diff line number Diff line Loading @@ -897,13 +897,38 @@ public class KeyEvent extends InputEvent implements Parcelable { * This key is handled by the framework and is never delivered to applications. */ public static final int KEYCODE_RECENT_APPS = 312; /** * Key code constant: A button whose usage can be customized by the user through * the system. * User customizable key #1. */ public static final int KEYCODE_MACRO_1 = 313; /** * Key code constant: A button whose usage can be customized by the user through * the system. * User customizable key #2. */ public static final int KEYCODE_MACRO_2 = 314; /** * Key code constant: A button whose usage can be customized by the user through * the system. * User customizable key #3. */ public static final int KEYCODE_MACRO_3 = 315; /** * Key code constant: A button whose usage can be customized by the user through * the system. * User customizable key #4. */ public static final int KEYCODE_MACRO_4 = 316; /** * Integer value of the last KEYCODE. Increases as new keycodes are added to KeyEvent. * @hide */ @TestApi public static final int LAST_KEYCODE = KEYCODE_RECENT_APPS; public static final int LAST_KEYCODE = KEYCODE_MACRO_4; // NOTE: If you add a new keycode here you must also add it to: // isSystem() Loading data/keyboards/Generic.kl +4 −0 Original line number Diff line number Diff line Loading @@ -424,6 +424,10 @@ key 580 APP_SWITCH key 582 VOICE_ASSIST # Linux KEY_ASSISTANT key 583 ASSIST key 656 MACRO_1 key 657 MACRO_2 key 658 MACRO_3 key 659 MACRO_4 # Keys defined by HID usages key usage 0x0c0067 WINDOW Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -3285,6 +3285,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { Slog.wtf(TAG, "KEYCODE_STYLUS_BUTTON_* should be handled in" + " interceptKeyBeforeQueueing"); return key_consumed; case KeyEvent.KEYCODE_MACRO_1: case KeyEvent.KEYCODE_MACRO_2: case KeyEvent.KEYCODE_MACRO_3: case KeyEvent.KEYCODE_MACRO_4: Slog.wtf(TAG, "KEYCODE_MACRO_x should be handled in interceptKeyBeforeQueueing"); return key_consumed; } if (isValidGlobalKey(keyCode) Loading Loading @@ -4424,6 +4430,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { result &= ~ACTION_PASS_TO_USER; break; } case KeyEvent.KEYCODE_MACRO_1: case KeyEvent.KEYCODE_MACRO_2: case KeyEvent.KEYCODE_MACRO_3: case KeyEvent.KEYCODE_MACRO_4: // TODO(b/266098478): Add logic to handle KEYCODE_MACROx feature result &= ~ACTION_PASS_TO_USER; break; } if (useHapticFeedback) { Loading Loading
core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -50891,6 +50891,10 @@ package android.view { field public static final int KEYCODE_LAST_CHANNEL = 229; // 0xe5 field public static final int KEYCODE_LEFT_BRACKET = 71; // 0x47 field public static final int KEYCODE_M = 41; // 0x29 field public static final int KEYCODE_MACRO_1 = 313; // 0x139 field public static final int KEYCODE_MACRO_2 = 314; // 0x13a field public static final int KEYCODE_MACRO_3 = 315; // 0x13b field public static final int KEYCODE_MACRO_4 = 316; // 0x13c field public static final int KEYCODE_MANNER_MODE = 205; // 0xcd field public static final int KEYCODE_MEDIA_AUDIO_TRACK = 222; // 0xde field public static final int KEYCODE_MEDIA_CLOSE = 128; // 0x80
core/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3310,7 +3310,7 @@ package android.view { method public static String actionToString(int); method public final void setDisplayId(int); field public static final int FLAG_IS_ACCESSIBILITY_EVENT = 2048; // 0x800 field public static final int LAST_KEYCODE = 312; // 0x138 field public static final int LAST_KEYCODE = 316; // 0x13c } public final class KeyboardShortcutGroup implements android.os.Parcelable { Loading
core/java/android/view/KeyEvent.java +26 −1 Original line number Diff line number Diff line Loading @@ -897,13 +897,38 @@ public class KeyEvent extends InputEvent implements Parcelable { * This key is handled by the framework and is never delivered to applications. */ public static final int KEYCODE_RECENT_APPS = 312; /** * Key code constant: A button whose usage can be customized by the user through * the system. * User customizable key #1. */ public static final int KEYCODE_MACRO_1 = 313; /** * Key code constant: A button whose usage can be customized by the user through * the system. * User customizable key #2. */ public static final int KEYCODE_MACRO_2 = 314; /** * Key code constant: A button whose usage can be customized by the user through * the system. * User customizable key #3. */ public static final int KEYCODE_MACRO_3 = 315; /** * Key code constant: A button whose usage can be customized by the user through * the system. * User customizable key #4. */ public static final int KEYCODE_MACRO_4 = 316; /** * Integer value of the last KEYCODE. Increases as new keycodes are added to KeyEvent. * @hide */ @TestApi public static final int LAST_KEYCODE = KEYCODE_RECENT_APPS; public static final int LAST_KEYCODE = KEYCODE_MACRO_4; // NOTE: If you add a new keycode here you must also add it to: // isSystem() Loading
data/keyboards/Generic.kl +4 −0 Original line number Diff line number Diff line Loading @@ -424,6 +424,10 @@ key 580 APP_SWITCH key 582 VOICE_ASSIST # Linux KEY_ASSISTANT key 583 ASSIST key 656 MACRO_1 key 657 MACRO_2 key 658 MACRO_3 key 659 MACRO_4 # Keys defined by HID usages key usage 0x0c0067 WINDOW Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -3285,6 +3285,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { Slog.wtf(TAG, "KEYCODE_STYLUS_BUTTON_* should be handled in" + " interceptKeyBeforeQueueing"); return key_consumed; case KeyEvent.KEYCODE_MACRO_1: case KeyEvent.KEYCODE_MACRO_2: case KeyEvent.KEYCODE_MACRO_3: case KeyEvent.KEYCODE_MACRO_4: Slog.wtf(TAG, "KEYCODE_MACRO_x should be handled in interceptKeyBeforeQueueing"); return key_consumed; } if (isValidGlobalKey(keyCode) Loading Loading @@ -4424,6 +4430,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { result &= ~ACTION_PASS_TO_USER; break; } case KeyEvent.KEYCODE_MACRO_1: case KeyEvent.KEYCODE_MACRO_2: case KeyEvent.KEYCODE_MACRO_3: case KeyEvent.KEYCODE_MACRO_4: // TODO(b/266098478): Add logic to handle KEYCODE_MACROx feature result &= ~ACTION_PASS_TO_USER; break; } if (useHapticFeedback) { Loading