diff options
| author | Jeff Brown <jeffbrown@google.com> | 2010-11-11 18:47:57 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-11-11 18:47:57 -0800 |
| commit | 1aab83501cb2ddc264ec9913d1062b1c87344e3a (patch) | |
| tree | b25f084be49f04ce76bd25e5178e58de4bca085c /core | |
| parent | 2a88ffe118b454facb906f75dfaa403853dc6477 (diff) | |
| parent | 3adf490a5aaa2e87676c8985b566fcb0dfeb74b9 (diff) | |
| download | frameworks_base-1aab83501cb2ddc264ec9913d1062b1c87344e3a.zip frameworks_base-1aab83501cb2ddc264ec9913d1062b1c87344e3a.tar.gz frameworks_base-1aab83501cb2ddc264ec9913d1062b1c87344e3a.tar.bz2 | |
Merge "Add new keycodes initially used for GoogleTV devices."
Diffstat (limited to 'core')
| -rwxr-xr-x | core/java/android/view/KeyEvent.java | 91 | ||||
| -rwxr-xr-x | core/res/res/values/attrs.xml | 22 |
2 files changed, 111 insertions, 2 deletions
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java index e7a16a2..63c1137 100755 --- a/core/java/android/view/KeyEvent.java +++ b/core/java/android/view/KeyEvent.java @@ -463,8 +463,73 @@ public class KeyEvent extends InputEvent implements Parcelable { * This key should normally be implemented as a toggle such that the first press * mutes the speaker and the second press restores the original volume. */ public static final int KEYCODE_VOLUME_MUTE = 164; - - private static final int LAST_KEYCODE = KEYCODE_VOLUME_MUTE; + /** Key code constant: Info key. + * Common on TV remotes to show additional information related to what is + * currently being viewed. */ + public static final int KEYCODE_INFO = 165; + /** Key code constant: Channel up key. + * On TV remotes, increments the television channel. */ + public static final int KEYCODE_CHANNEL_UP = 166; + /** Key code constant: Channel down key. + * On TV remotes, decrements the television channel. */ + public static final int KEYCODE_CHANNEL_DOWN = 167; + /** Key code constant: Zoom in key. */ + public static final int KEYCODE_ZOOM_IN = 168; + /** Key code constant: Zoom out key. */ + public static final int KEYCODE_ZOOM_OUT = 169; + /** Key code constant: TV key. + * On TV remotes, switches to viewing live TV. */ + public static final int KEYCODE_TV = 170; + /** Key code constant: Window key. + * On TV remotes, toggles picture-in-picture mode or other windowing functions. */ + public static final int KEYCODE_WINDOW = 171; + /** Key code constant: Guide key. + * On TV remotes, shows a programming guide. */ + public static final int KEYCODE_GUIDE = 172; + /** Key code constant: DVR key. + * On some TV remotes, switches to a DVR mode for recorded shows. */ + public static final int KEYCODE_DVR = 173; + /** Key code constant: Bookmark key. + * On some TV remotes, bookmarks content or web pages. */ + public static final int KEYCODE_BOOKMARK = 174; + /** Key code constant: Toggle captions key. + * Switches the mode for closed-captioning text, for example during television shows. */ + public static final int KEYCODE_CAPTIONS = 175; + /** Key code constant: Settings key. + * Starts the system settings activity. */ + public static final int KEYCODE_SETTINGS = 176; + /** Key code constant: TV power key. + * On TV remotes, toggles the power on a television screen. */ + public static final int KEYCODE_TV_POWER = 177; + /** Key code constant: TV input key. + * On TV remotes, switches the input on a television screen. */ + public static final int KEYCODE_TV_INPUT = 178; + /** Key code constant: Set-top-box power key. + * On TV remotes, toggles the power on an external Set-top-box. */ + public static final int KEYCODE_STB_POWER = 179; + /** Key code constant: Set-top-box input key. + * On TV remotes, switches the input mode on an external Set-top-box. */ + public static final int KEYCODE_STB_INPUT = 180; + /** Key code constant: A/V Receiver power key. + * On TV remotes, toggles the power on an external A/V Receiver. */ + public static final int KEYCODE_AVR_POWER = 181; + /** Key code constant: A/V Receiver input key. + * On TV remotes, switches the input mode on an external A/V Receiver. */ + public static final int KEYCODE_AVR_INPUT = 182; + /** Key code constant: Red "programmable" key. + * On TV remotes, acts as a contextual/programmable key. */ + public static final int KEYCODE_PROG_RED = 183; + /** Key code constant: Green "programmable" key. + * On TV remotes, actsas a contextual/programmable key. */ + public static final int KEYCODE_PROG_GREEN = 184; + /** Key code constant: Yellow "programmable" key. + * On TV remotes, acts as a contextual/programmable key. */ + public static final int KEYCODE_PROG_YELLOW = 185; + /** Key code constant: Blue "programmable" key. + * On TV remotes, acts as a contextual/programmable key. */ + public static final int KEYCODE_PROG_BLUE = 186; + + private static final int LAST_KEYCODE = KEYCODE_PROG_BLUE; // NOTE: If you add a new keycode here you must also add it to: // isSystem() @@ -649,6 +714,28 @@ public class KeyEvent extends InputEvent implements Parcelable { "KEYCODE_NUMPAD_LEFT_PAREN", "KEYCODE_NUMPAD_RIGHT_PAREN", "KEYCODE_VOLUME_MUTE", + "KEYCODE_INFO", + "KEYCODE_CHANNEL_UP", + "KEYCODE_CHANNEL_DOWN", + "KEYCODE_ZOOM_IN", + "KEYCODE_ZOOM_OUT", + "KEYCODE_TV", + "KEYCODE_WINDOW", + "KEYCODE_GUIDE", + "KEYCODE_DVR", + "KEYCODE_BOOKMARK", + "KEYCODE_CAPTIONS", + "KEYCODE_SETTINGS", + "KEYCODE_TV_POWER", + "KEYCODE_TV_INPUT", + "KEYCODE_STB_INPUT", + "KEYCODE_STB_POWER", + "KEYCODE_AVR_POWER", + "KEYCODE_AVR_INPUT", + "KEYCODE_PROG_RED", + "KEYCODE_PROG_GREEN", + "KEYCODE_PROG_YELLOW", + "KEYCODE_PROG_BLUE", }; // Symbolic names of all metakeys in bit order from least significant to most significant. diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 115e59d..7ff75b3 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -1170,6 +1170,28 @@ <enum name="KEYCODE_NUMPAD_LEFT_PAREN" value="162" /> <enum name="KEYCODE_NUMPAD_RIGHT_PAREN" value="163" /> <enum name="KEYCODE_VOLUME_MUTE" value="164" /> + <enum name="KEYCODE_INFO" value="165" /> + <enum name="KEYCODE_CHANNEL_UP" value="166" /> + <enum name="KEYCODE_CHANNEL_DOWN" value="167" /> + <enum name="KEYCODE_ZOOM_IN" value="168" /> + <enum name="KEYCODE_ZOOM_OUT" value="169" /> + <enum name="KEYCODE_TV" value="170" /> + <enum name="KEYCODE_WINDOW" value="171" /> + <enum name="KEYCODE_GUIDE" value="172" /> + <enum name="KEYCODE_DVR" value="173" /> + <enum name="KEYCODE_BOOKMARK" value="174" /> + <enum name="KEYCODE_CAPTIONS" value="175" /> + <enum name="KEYCODE_SETTINGS" value="176" /> + <enum name="KEYCODE_TV_POWER" value="177" /> + <enum name="KEYCODE_TV_INPUT" value="178" /> + <enum name="KEYCODE_STB_POWER" value="179" /> + <enum name="KEYCODE_STB_INPUT" value="180" /> + <enum name="KEYCODE_AVR_POWER" value="181" /> + <enum name="KEYCODE_AVR_INPUT" value="182" /> + <enum name="KEYCODE_PROG_GRED" value="183" /> + <enum name="KEYCODE_PROG_GREEN" value="184" /> + <enum name="KEYCODE_PROG_YELLOW" value="185" /> + <enum name="KEYCODE_PROG_BLUE" value="186" /> </attr> <!-- ***************************************************************** --> |
