summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-08 00:48:53 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-08 00:48:53 +0000
commit5720225ccf919ba3fa7a01d6abbc559af50f746e (patch)
treec710053e955df3d0d4e756f9fe0ac8f70dffdabe
parent995f7736a35f27a66e5508060388a7c95aeb9cc1 (diff)
downloadchromium_src-5720225ccf919ba3fa7a01d6abbc559af50f746e.zip
chromium_src-5720225ccf919ba3fa7a01d6abbc559af50f746e.tar.gz
chromium_src-5720225ccf919ba3fa7a01d6abbc559af50f746e.tar.bz2
Add VKEYs for Japanese JP106 keyboard and conversion rules for the new VKEYs.
The VKEYs are necessary for moving IME hotkey handling code from X to Aura. On Windows, VK_CONVERT is sent to Chrome when Henkan (convertion) key is pressed, VK_NONCONVERT is sent on Muhenkan (no-conversion), and VK_DBE_SBCSCHAR and VK_DBE_DBCSCHAR are sent alternately on Zenkaku/Hankaku (full-width/half-widht toggle). On ChromeOS, keyboard_code_conversion_x.cc emulates the behavior as much as possible. http://msdn.microsoft.com/en-us/library/cc194848.aspx BUG=110408 TEST=try Review URL: http://codereview.chromium.org/9325088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120883 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/base/keycodes/keyboard_code_conversion_x.cc14
-rw-r--r--ui/base/keycodes/keyboard_codes_posix.h4
-rw-r--r--ui/base/keycodes/keyboard_codes_win.h5
3 files changed, 21 insertions, 2 deletions
diff --git a/ui/base/keycodes/keyboard_code_conversion_x.cc b/ui/base/keycodes/keyboard_code_conversion_x.cc
index 32aac637..23511f6 100644
--- a/ui/base/keycodes/keyboard_code_conversion_x.cc
+++ b/ui/base/keycodes/keyboard_code_conversion_x.cc
@@ -91,6 +91,12 @@ KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym) {
return VKEY_HANJA;
case XK_Kanji:
return VKEY_KANJI;
+ case XK_Henkan:
+ return VKEY_CONVERT;
+ case XK_Muhenkan:
+ return VKEY_NONCONVERT;
+ case XK_Zenkaku_Hankaku:
+ return VKEY_DBE_DBCSCHAR;
case XK_A:
case XK_a:
return VKEY_A;
@@ -512,6 +518,14 @@ int XKeysymForWindowsKeyCode(KeyboardCode keycode, bool shift) {
return XK_Kana_Lock;
case VKEY_HANJA:
return XK_Hangul_Hanja;
+ case VKEY_CONVERT:
+ return XK_Henkan;
+ case VKEY_NONCONVERT:
+ return XK_Muhenkan;
+ case VKEY_DBE_SBCSCHAR:
+ return XK_Zenkaku_Hankaku;
+ case VKEY_DBE_DBCSCHAR:
+ return XK_Zenkaku_Hankaku;
case VKEY_ESCAPE:
return XK_Escape;
case VKEY_SPACE:
diff --git a/ui/base/keycodes/keyboard_codes_posix.h b/ui/base/keycodes/keyboard_codes_posix.h
index 023701e..c9757b8 100644
--- a/ui/base/keycodes/keyboard_codes_posix.h
+++ b/ui/base/keycodes/keyboard_codes_posix.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -193,6 +193,8 @@ typedef enum {
VKEY_OEM_102 = 0xE2,
VKEY_PROCESSKEY = 0xE5,
VKEY_PACKET = 0xE7,
+ VKEY_DBE_SBCSCHAR = 0xF3,
+ VKEY_DBE_DBCSCHAR = 0xF4,
VKEY_ATTN = 0xF6,
VKEY_CRSEL = 0xF7,
VKEY_EXSEL = 0xF8,
diff --git a/ui/base/keycodes/keyboard_codes_win.h b/ui/base/keycodes/keyboard_codes_win.h
index 362fc5f..060c9c7 100644
--- a/ui/base/keycodes/keyboard_codes_win.h
+++ b/ui/base/keycodes/keyboard_codes_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,6 +7,7 @@
#pragma once
#include <windows.h>
+#include <ime.h>
namespace ui {
@@ -169,6 +170,8 @@ typedef enum {
VKEY_OEM_102 = VK_OEM_102,
VKEY_PROCESSKEY = VK_PROCESSKEY,
VKEY_PACKET = VK_PACKET,
+ VKEY_DBE_SBCSCHAR = VK_DBE_SBCSCHAR,
+ VKEY_DBE_DBCSCHAR = VK_DBE_DBCSCHAR,
VKEY_ATTN = VK_ATTN,
VKEY_CRSEL = VK_CRSEL,
VKEY_EXSEL = VK_EXSEL,