<?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>24740</bug_id>
          
          <creation_ts>2014-02-20 03:22:39 +0000</creation_ts>
          <short_desc>Define code values for the special keys on Mac keyboard</short_desc>
          <delta_ts>2014-04-15 18:07:46 +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 - DOM3 Events</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Masayuki Nakano">masayuki</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>garykac</cc>
    
    <cc>mike</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>100943</commentid>
    <comment_count>0</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2014-02-20 03:22:39 +0000</bug_when>
    <thetext>I tested on JIS keyboard for Mac.

Printed key name          USB Usage ID Page 0x07    Name in USB-HID spec
英数(Eisu)                 0x91                      LANG2
かな(Kana)                 0x92                      LANG1
F13 - F19                 0x68 - 0x6E               F13 - F19</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101880</commentid>
    <comment_count>1</comment_count>
    <who name="Gary Kacmarcik">garykac</who>
    <bug_when>2014-03-05 00:10:39 +0000</bug_when>
    <thetext>For F13-F19, we cover that with the line after the table:

&quot;For keyboards that provide more than 12 function keys, the code value follows the pattern shown above with &apos;F&apos; followed by the function key number - &apos;F13&apos;, &apos;F14&apos;, &apos;F15&apos;, and so on.&quot;

We&apos;ll need to add a code for Eisu.

For Kana, can we not use &apos;KanaMode&apos; for this? It looks like the USB code is different for KanaMode (0x88) and Kana (0x92).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101885</commentid>
    <comment_count>2</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2014-03-05 00:36:32 +0000</bug_when>
    <thetext>(In reply to Gary Kacmarcik from comment #1)
&gt; We&apos;ll need to add a code for Eisu.
&gt; 
&gt; For Kana, can we not use &apos;KanaMode&apos; for this? It looks like the USB code is
&gt; different for KanaMode (0x88) and Kana (0x92).

Oops, I realized that 0x91 conflicts with key of Korean keyboard...

&gt; 145 91 Keyboard LANG2 26
&gt; 146 92 Keyboard LANG3 30

&gt; 26 Hanja conversion key. This usage is used as an input method
&gt;    editor control key on a Korean language keyboard. 
&gt; 30 Defines the Katakana key for Japanese USB word-processing keyboards.

See also &quot;List of code values for functional keys found on Japanese and Korean keyboards.&quot; of D3E spec.

So, it&apos;s might better D3E to define more abstract name form them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103504</commentid>
    <comment_count>3</comment_count>
    <who name="Gary Kacmarcik">garykac</who>
    <bug_when>2014-04-07 21:06:46 +0000</bug_when>
    <thetext>I&apos;ve added &apos;Eisu&apos;, &apos;Hiragana&apos; and &apos;Katakana&apos; |code| values so that these keys can be encoded when found on keyboards.

However, for the Mac &apos;かな&apos; key, it sounds like this toggles between kana modes so &apos;KanaMode&apos; would be more appropriate.

The &apos;Hiragana&apos; and &apos;Katakana&apos; key code values should be used for keys that always switch into hiragana or katakana mode rather that toggling between states.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103589</commentid>
    <comment_count>4</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2014-04-09 07:35:12 +0000</bug_when>
    <thetext>Hmm, when I connect Mac JIS keyboard, following keys conflict:
               Mac JIS keyboard           Korean keyboard           USB HID
ScanCode:71    Eisu (英数)                 Hanja (한자)               0x91
ScanCode:72    Kana (かな)                 HangulMode (한/영)         0x90

Sorry, I logged wrong value for Kana key.

I believe that these code values should be abstract names such as LANG1, LANG2 of USB HID spec.

&gt; However, for the Mac &apos;かな&apos; key, it sounds like this toggles between kana modes so &apos;KanaMode&apos; would be more appropriate.

This sound like the concept of .key value. Doesn&apos;t .code represent physical keys?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103887</commentid>
    <comment_count>5</comment_count>
    <who name="Gary Kacmarcik">garykac</who>
    <bug_when>2014-04-15 18:07:46 +0000</bug_when>
    <thetext>&gt; I believe that these code values should be abstract names such as LANG1, LANG2 of USB HID spec.

Yes, if different keys share the same values, then we should use the more generic Lang1 ... Lang5 names.

&gt; This sound like the concept of .key value. Doesn&apos;t .code represent physical keys?

Yes, but I was (incorrectly) thinking that the key had only a single purpose, in which case the |key| and |code| values would be similar.  Since the Korean and Mac Japanese keyboards share the same USB code, they should share the same |code| values.

I&apos;ve updated the code value tables with the new names and the additional information that you provided.

Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>