Commit 2da81172 authored by Erik Jensen's avatar Erik Jensen Committed by Commit Bot

Correct Japanese language keys for Mac.

The Apple Japanese keyboard has two language keys: kana to the right of
the spacebar, and eisu to the left. These use the USB codes for Lang1
and Lang2, respectively.

The uievents-code spec mentions this in the (non-normative) notes for
Lang1 and Lang2:
https://www.w3.org/TR/uievents-code/#table-key-code-alphanumeric-functional-2

This can also be seen in the USB-to-ADB mapping table used by the HID
driver source code published by Apple:
https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-1090.260.23/IOHIDFamily/Cosmo_USB2ADB.c.auto.html

Change-Id: Ib856fbba2d0916c6016625abe226d394edcb5fa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029173Reviewed-by: default avatarWez <wez@chromium.org>
Commit-Queue: Erik Jensen <rkjnsn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736936}
parent a4ff2eaa
...@@ -312,7 +312,7 @@ DOM_CODE_DECLARATION { ...@@ -312,7 +312,7 @@ DOM_CODE_DECLARATION {
DOM_CODE(0x070087, 0x0059, 0x0061, 0x0073, 0x005e, "IntlRo", INTL_RO), DOM_CODE(0x070087, 0x0059, 0x0061, 0x0073, 0x005e, "IntlRo", INTL_RO),
// International2 // International2
// USB#070088 is used as Japanese Hiragana/Katakana key. // USB#070088 is used as Japanese Hiragana/Katakana key.
DOM_CODE(0x070088, 0x005d, 0x0065, 0x0070, 0x0068, "KanaMode", KANA_MODE), DOM_CODE(0x070088, 0x005d, 0x0065, 0x0070, 0xffff, "KanaMode", KANA_MODE),
// International3 // International3
// USB#070089 is used as Japanese Yen key. // USB#070089 is used as Japanese Yen key.
DOM_CODE(0x070089, 0x007c, 0x0084, 0x007d, 0x005d, "IntlYen", INTL_YEN), DOM_CODE(0x070089, 0x007c, 0x0084, 0x007d, 0x005d, "IntlYen", INTL_YEN),
...@@ -328,11 +328,13 @@ DOM_CODE_DECLARATION { ...@@ -328,11 +328,13 @@ DOM_CODE_DECLARATION {
//DOM_CODE(0x07008f, 0x0000, 0x0000, 0x0000, 0xffff, NULL, INTERNATIONAL9), //DOM_CODE(0x07008f, 0x0000, 0x0000, 0x0000, 0xffff, NULL, INTERNATIONAL9),
// LANG1 // LANG1
// USB#070090 is used as Korean Hangul/English toggle key. // USB#070090 is used as Korean Hangul/English toggle key, and as the Kana key
DOM_CODE(0x070090, 0x007a, 0x0082, 0x0072, 0xffff, "Lang1", LANG1), // on the Apple Japanese keyboard.
DOM_CODE(0x070090, 0x007a, 0x0082, 0x0072, 0x0068, "Lang1", LANG1),
// LANG2 // LANG2
// USB#070091 is used as Korean Hanja conversion key. // USB#070091 is used as Korean Hanja conversion key, and as the Eisu key on
DOM_CODE(0x070091, 0x007b, 0x0083, 0x0071, 0xffff, "Lang2", LANG2), // the Apple Japanese keyboard.
DOM_CODE(0x070091, 0x007b, 0x0083, 0x0071, 0x0066, "Lang2", LANG2),
// LANG3 // LANG3
// USB#070092 is used as Japanese Katakana key. // USB#070092 is used as Japanese Katakana key.
DOM_CODE(0x070092, 0x005a, 0x0062, 0x0078, 0xffff, "Lang3", LANG3), DOM_CODE(0x070092, 0x005a, 0x0062, 0x0078, 0xffff, "Lang3", LANG3),
......
...@@ -27,7 +27,7 @@ const size_t expected_mapped_key_count[] = { ...@@ -27,7 +27,7 @@ const size_t expected_mapped_key_count[] = {
213, // evdev 213, // evdev
213, // xkb 213, // xkb
157, // windows 157, // windows
118, // mac 119, // mac
}; };
const size_t kNativeColumns = base::size(expected_mapped_key_count); const size_t kNativeColumns = base::size(expected_mapped_key_count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment