<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21083</bug_id>
          
          <creation_ts>2013-02-22 09:23:52 +0000</creation_ts>
          <short_desc>Proposal key names for Android</short_desc>
          <delta_ts>2015-10-06 22:33:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - UI Events</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>21119</dependson>
    
    <dependson>21120</dependson>
    
    <dependson>21121</dependson>
    
    <dependson>21134</dependson>
    
    <dependson>21135</dependson>
    
    <dependson>21136</dependson>
    
    <dependson>21137</dependson>
    
    <dependson>21139</dependson>
    
    <dependson>21140</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Masayuki Nakano">masayuki</reporter>
          <assigned_to name="Gary Kacmarcik">garykac</assigned_to>
          <cc>garykac</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>83534</commentid>
    <comment_count>0</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-02-22 09:23:52 +0000</bug_when>
    <thetext>I&apos;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, &apos;Exit&apos;? The key name is &apos;Home&apos; but it exits active application and moves to home screen.
* KEYCODE_BACK: &apos;Back&apos; as UI key? It&apos;s not only used for browser&apos;s &apos;back&apos;.
* KEYCODE_CALL: &apos;PhoneCall&apos; as Device key?
* KEYCODE_ENDCALL: &apos;PhoneEndCall&apos; as Device key?
* KEYCODE_SYM: &apos;Symbol&apos; as Modifier key? The Android document says this is a modifier, but D3E defines only &apos;SymbolLock&apos;.
* KEYCODE_NUM: I&apos;m not sure what&apos;s this key.
* KEYCODE_NOTIFICATION: I&apos;m not sure what&apos;s this key too.
* KEYCODE_PICTSYMBOLS: &apos;PictureSymbolMode&apos; as IME key?
* KEYCODE_MEDIA_CLOSE: &apos;Close&apos; as Device key? It closes opened tray by &apos;Eject&apos;. Then, &apos;Eject&apos; should be separated as &apos;Eject&apos; and &apos;EjectClose&apos;?
* KEYCODE_ZOOM_IN: &apos;ZoomIn&apos; as UI?
* KEYCODE_ZOOM_OUT: &apos;ZoomOut&apos; as UI?
* KEYCODE_TV: Perhaps, &apos;Live&apos;? But I think that &apos;TV&apos; as Media key is better.
* KEYCODE_DVR: &apos;DVR&apos; or &apos;VideoRecorder&apos; as Media key?
* KEYCODE_TV_POWER: &apos;TVPower&apos; as Media key?
* KEYCODE_TV_INPUT: &apos;TVSelectInput&apos; as Media key?
* KEYCODE_STB_POWER: &apos;STBPower&apos; as Media key?
* KEYCODE_STB_INPUT: &apos;STBSelectInput&apos; as Media key?
* KEYCODE_AVR_POWER: &apos;AVReceiverPower&apos; as Media key?
* KEYCODE_AVR_INPUT: &apos;AVReceiverSelectInput&apos; as Media key?
* KEYCODE_LANGUAGE_SWITCH: &apos;ToggleLanguage&apos; or &apos;SwitchLanguage&apos; as IME key?
* KEYCODE_MANNER_MODE: &apos;ToggleMannerMode&apos;, &apos;SwitchMannerMode&apos; or just &apos;MannerMode&apos; as Device key?
* KEYCODE_3D_MODE: &apos;Toggle3DMode&apos; as Media key?
* KEYCODE_CONTACTS: &apos;LaunchAddressBook&apos; as General key?
* KEYCODE_CALENDAR: &apos;LaunchCalendar&apos; as General key?
* KEYCODE_MUSIC: &apos;LaunchMusicPlayer&apos; as General key?
* KEYCODE_CALCULATOR: &apos;LaunchCalculator&apos; as General key?
* KEYCODE_ZENKAKU_HANKAKU: &apos;ToggleWidth&apos; as IME key? Both &apos;FullWidth&apos; and &apos;HalfWidth&apos; are not useful for this.
* KEYCODE_KATAKANA_HIRAGANA: &apos;ToggleKatakanaHiragana&apos; as IME key? &apos;Katakana&apos; and &apos;Hiragana&apos; 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: 

&apos;GamePadButtonA&apos;..., &apos;GamePadThumbLeft&apos;, &apos;GamePadThumbRight&apos;, &apos;GamePadButton1&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83535</commentid>
    <comment_count>1</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-02-22 09:24:37 +0000</bug_when>
    <thetext>Oops, the document of Android is here:
http://developer.android.com/reference/android/view/KeyEvent.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83611</commentid>
    <comment_count>2</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-02-23 02:21:53 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; KEYCODE_THUMBL:
&gt; KEYCODE_THUMBR:

They are:

KEYCODE_BUTTON_THUMBL:
KEYCODE_BUTTON_THUMBR:

Then, the names are:

&gt; &apos;GamePadButtonThumbLeft&apos;, &apos;GamePadButtonThumbRight&apos;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83698</commentid>
    <comment_count>3</comment_count>
    <who name="Gary Kacmarcik">garykac</who>
    <bug_when>2013-02-26 05:41:45 +0000</bug_when>
    <thetext>I&apos;m not sure it makes sense to maps these values to &apos;key&apos; or &apos;char&apos;.

The documentation states:
&quot;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.&quot;

This sounds more like a &apos;code&apos; 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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83699</commentid>
    <comment_count>4</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-02-26 05:59:17 +0000</bug_when>
    <thetext>Gary:

I&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83779</commentid>
    <comment_count>5</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-02-27 02:36:57 +0000</bug_when>
    <thetext>I separated following key definition to bug 21121:

&gt; * KEYCODE_CALL: &apos;PhoneCall&apos; as Device key?
&gt; * KEYCODE_* KEYCODE_MANNER_MODE: &apos;ToggleMannerMode&apos;, &apos;SwitchMannerMode&apos; or just &apos;MannerMode&apos; as Device key?
&gt; * ENDCALL: &apos;PhoneEndCall&apos; as Device key?
&gt; * KEYCODE_CONTACTS: &apos;LaunchAddressBook&apos; as General key?

I separated following key definition to bug 21120:

&gt; * KEYCODE_TV: Perhaps, &apos;Live&apos;? But I think that &apos;TV&apos; as Media key is better.
&gt; * KEYCODE_DVR: &apos;DVR&apos; or &apos;VideoRecorder&apos; as Media key?
&gt; * KEYCODE_TV_POWER: &apos;TVPower&apos; as Media key?
&gt; * KEYCODE_TV_INPUT: &apos;TVSelectInput&apos; as Media key?
&gt; * KEYCODE_STB_POWER: &apos;STBPower&apos; as Media key?
&gt; * KEYCODE_STB_INPUT: &apos;STBSelectInput&apos; as Media key?
&gt; * KEYCODE_AVR_POWER: &apos;AVReceiverPower&apos; as Media key?
&gt; * KEYCODE_AVR_INPUT: &apos;AVReceiverSelectInput&apos; as Media key?
&gt; * KEYCODE_3D_MODE: &apos;Toggle3DMode&apos; as Media key?

I separated following key definition to bug 21119:

&gt; * KEYCODE_ZOOM_IN: &apos;ZoomIn&apos; as UI?
&gt; * KEYCODE_ZOOM_OUT: &apos;ZoomOut&apos; as UI?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83784</commentid>
    <comment_count>6</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-02-27 03:57:50 +0000</bug_when>
    <thetext>I separated following key definition to bug 21136:

&gt; * KEYCODE_HOME: Perhaps, &apos;Exit&apos;? The key name is &apos;Home&apos; but it exits active application and moves to home screen.
&gt; * KEYCODE_BACK: &apos;Back&apos; as UI key? It&apos;s not only used for browser&apos;s &apos;back&apos;.

I separated following key definition to bug 21135:

&gt; * KEYCODE_SYM: &apos;Symbol&apos; as Modifier key? The Android document says this is a modifier, but D3E defines only &apos;SymbolLock&apos;.

I separated following key definition to bug 21134:

&gt; * KEYCODE_CONTACTS: &apos;LaunchAddressBook&apos; as General key?
&gt; * KEYCODE_MUSIC: &apos;LaunchMusicPlayer&apos; as General key?
&gt; * KEYCODE_CALCULATOR: &apos;LaunchCalculator&apos; as General key?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83790</commentid>
    <comment_count>7</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-02-27 06:13:08 +0000</bug_when>
    <thetext>I separated the game pad related keys definition to bug 21137.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83793</commentid>
    <comment_count>8</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-02-27 06:47:59 +0000</bug_when>
    <thetext>I filed bug 21139 for
&gt; * KEYCODE_ZENKAKU_HANKAKU: &apos;ToggleWidth&apos; as IME key? Both &apos;FullWidth&apos; and &apos;HalfWidth&apos; are not useful for this.
&gt; * KEYCODE_KATAKANA_HIRAGANA: &apos;ToggleKatakanaHiragana&apos; as IME key? &apos;Katakana&apos; and &apos;Hiragana&apos; key are not useful for this.

And I filed bug 21083 for
&gt; * KEYCODE_PICTSYMBOLS: &apos;PictureSymbolMode&apos; as IME key?
&gt; * KEYCODE_LANGUAGE_SWITCH: &apos;ToggleLanguage&apos; or &apos;SwitchLanguage&apos; 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&apos;m not sure what&apos;s this key.
* KEYCODE_NOTIFICATION: I&apos;m not sure what&apos;s this key too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123543</commentid>
    <comment_count>9</comment_count>
    <who name="Gary Kacmarcik">garykac</who>
    <bug_when>2015-10-06 22:33:39 +0000</bug_when>
    <thetext>Now tracking as: https://github.com/w3c/uievents/issues/9</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>