This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I'm trying to implement KeyboardEvent.key value for non-printable keys on Android. Then, following native keys cannot be mapped to the key names in the list (http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#key-values-list): * KEYCODE_SOFT_LEFT: I have no idea. * KEYCODE_SOFT_RIGHT: I have no idea. * KEYCODE_HOME: Perhaps, 'Exit'? The key name is 'Home' but it exits active application and moves to home screen. * KEYCODE_BACK: 'Back' as UI key? It's not only used for browser's 'back'. * KEYCODE_CALL: 'PhoneCall' as Device key? * KEYCODE_ENDCALL: 'PhoneEndCall' as Device key? * KEYCODE_SYM: 'Symbol' as Modifier key? The Android document says this is a modifier, but D3E defines only 'SymbolLock'. * KEYCODE_NUM: I'm not sure what's this key. * KEYCODE_NOTIFICATION: I'm not sure what's this key too. * KEYCODE_PICTSYMBOLS: 'PictureSymbolMode' as IME key? * KEYCODE_MEDIA_CLOSE: 'Close' as Device key? It closes opened tray by 'Eject'. Then, 'Eject' should be separated as 'Eject' and 'EjectClose'? * KEYCODE_ZOOM_IN: 'ZoomIn' as UI? * KEYCODE_ZOOM_OUT: 'ZoomOut' as UI? * KEYCODE_TV: Perhaps, 'Live'? But I think that 'TV' as Media key is better. * KEYCODE_DVR: 'DVR' or 'VideoRecorder' as Media key? * KEYCODE_TV_POWER: 'TVPower' as Media key? * KEYCODE_TV_INPUT: 'TVSelectInput' as Media key? * KEYCODE_STB_POWER: 'STBPower' as Media key? * KEYCODE_STB_INPUT: 'STBSelectInput' as Media key? * KEYCODE_AVR_POWER: 'AVReceiverPower' as Media key? * KEYCODE_AVR_INPUT: 'AVReceiverSelectInput' as Media key? * KEYCODE_LANGUAGE_SWITCH: 'ToggleLanguage' or 'SwitchLanguage' as IME key? * KEYCODE_MANNER_MODE: 'ToggleMannerMode', 'SwitchMannerMode' or just 'MannerMode' as Device key? * KEYCODE_3D_MODE: 'Toggle3DMode' as Media key? * KEYCODE_CONTACTS: 'LaunchAddressBook' as General key? * KEYCODE_CALENDAR: 'LaunchCalendar' as General key? * KEYCODE_MUSIC: 'LaunchMusicPlayer' as General key? * KEYCODE_CALCULATOR: 'LaunchCalculator' as General key? * KEYCODE_ZENKAKU_HANKAKU: 'ToggleWidth' as IME key? Both 'FullWidth' and 'HalfWidth' are not useful for this. * KEYCODE_KATAKANA_HIRAGANA: 'ToggleKatakanaHiragana' as IME key? 'Katakana' and 'Hiragana' key are not useful for this. And for game pad: KEYCODE_BUTTON_A: KEYCODE_BUTTON_B: KEYCODE_BUTTON_C: KEYCODE_BUTTON_X: KEYCODE_BUTTON_Y: KEYCODE_BUTTON_Z: KEYCODE_BUTTON_L1: KEYCODE_BUTTON_R1: KEYCODE_BUTTON_L2: KEYCODE_BUTTON_R2: KEYCODE_THUMBL: KEYCODE_THUMBR: KEYCODE_BUTTON_START: KEYCODE_BUTTON_SELECT: KEYCODE_BUTTON_MODE: KEYCODE_BUTTON_1: KEYCODE_BUTTON_2: KEYCODE_BUTTON_3: KEYCODE_BUTTON_4: KEYCODE_BUTTON_5: KEYCODE_BUTTON_6: KEYCODE_BUTTON_7: KEYCODE_BUTTON_8: KEYCODE_BUTTON_9: KEYCODE_BUTTON_10: KEYCODE_BUTTON_11: KEYCODE_BUTTON_12: KEYCODE_BUTTON_13: KEYCODE_BUTTON_14: KEYCODE_BUTTON_15: KEYCODE_BUTTON_16: 'GamePadButtonA'..., 'GamePadThumbLeft', 'GamePadThumbRight', 'GamePadButton1"?
Oops, the document of Android is here: http://developer.android.com/reference/android/view/KeyEvent.html
(In reply to comment #0) > KEYCODE_THUMBL: > KEYCODE_THUMBR: They are: KEYCODE_BUTTON_THUMBL: KEYCODE_BUTTON_THUMBR: Then, the names are: > 'GamePadButtonThumbLeft', 'GamePadButtonThumbRight'?
I'm not sure it makes sense to maps these values to 'key' or 'char'. The documentation states: "Key codes typically correspond one-to-one with individual keys on an input device. Many keys and key combinations serve quite different functions on different input devices so care must be taken when interpreting them. Always use the KeyCharacterMap associated with the input device when mapping keys to characters." This sounds more like a 'code' value and some of the names (like KEYCODE_ZENKAKU_HANKAKU and KEYCODE_KATAKANA_HIRAGANA) are consistent with this interpretation. To get a key/char, it looks like you'd need to pass the code value to the KeyCharacterMap (http://developer.android.com/reference/android/view/KeyCharacterMap.html) rather than using these codes directly.
Gary: I'm talking about non-printable keys. Looks like getDisplayLabel() returns null if the key is non-printable. http://developer.android.com/reference/android/view/KeyCharacterMap.html#getDisplayLabel%28int%29
I separated following key definition to bug 21121: > * KEYCODE_CALL: 'PhoneCall' as Device key? > * KEYCODE_* KEYCODE_MANNER_MODE: 'ToggleMannerMode', 'SwitchMannerMode' or just 'MannerMode' as Device key? > * ENDCALL: 'PhoneEndCall' as Device key? > * KEYCODE_CONTACTS: 'LaunchAddressBook' as General key? I separated following key definition to bug 21120: > * KEYCODE_TV: Perhaps, 'Live'? But I think that 'TV' as Media key is better. > * KEYCODE_DVR: 'DVR' or 'VideoRecorder' as Media key? > * KEYCODE_TV_POWER: 'TVPower' as Media key? > * KEYCODE_TV_INPUT: 'TVSelectInput' as Media key? > * KEYCODE_STB_POWER: 'STBPower' as Media key? > * KEYCODE_STB_INPUT: 'STBSelectInput' as Media key? > * KEYCODE_AVR_POWER: 'AVReceiverPower' as Media key? > * KEYCODE_AVR_INPUT: 'AVReceiverSelectInput' as Media key? > * KEYCODE_3D_MODE: 'Toggle3DMode' as Media key? I separated following key definition to bug 21119: > * KEYCODE_ZOOM_IN: 'ZoomIn' as UI? > * KEYCODE_ZOOM_OUT: 'ZoomOut' as UI?
I separated following key definition to bug 21136: > * KEYCODE_HOME: Perhaps, 'Exit'? The key name is 'Home' but it exits active application and moves to home screen. > * KEYCODE_BACK: 'Back' as UI key? It's not only used for browser's 'back'. I separated following key definition to bug 21135: > * KEYCODE_SYM: 'Symbol' as Modifier key? The Android document says this is a modifier, but D3E defines only 'SymbolLock'. I separated following key definition to bug 21134: > * KEYCODE_CONTACTS: 'LaunchAddressBook' as General key? > * KEYCODE_MUSIC: 'LaunchMusicPlayer' as General key? > * KEYCODE_CALCULATOR: 'LaunchCalculator' as General key?
I separated the game pad related keys definition to bug 21137.
I filed bug 21139 for > * KEYCODE_ZENKAKU_HANKAKU: 'ToggleWidth' as IME key? Both 'FullWidth' and 'HalfWidth' are not useful for this. > * KEYCODE_KATAKANA_HIRAGANA: 'ToggleKatakanaHiragana' as IME key? 'Katakana' and 'Hiragana' key are not useful for this. And I filed bug 21083 for > * KEYCODE_PICTSYMBOLS: 'PictureSymbolMode' as IME key? > * KEYCODE_LANGUAGE_SWITCH: 'ToggleLanguage' or 'SwitchLanguage' as IME key? Then, remaining issues here are: * KEYCODE_SOFT_LEFT: I have no idea. * KEYCODE_SOFT_RIGHT: I have no idea. * KEYCODE_NUM: I'm not sure what's this key. * KEYCODE_NOTIFICATION: I'm not sure what's this key too.
Now tracking as: https://github.com/w3c/uievents/issues/9