From 9ecf37bd464442f89a635f11347321765f07c8a8 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Thu, 17 May 2012 16:04:16 +0900 Subject: [PATCH] Bug 677252 part.2 Add Eisu keycode for Japanese keyboard layout of Mac r=smichaud, sr=smaug --- content/events/public/nsVKList.h | 1 + dom/interfaces/events/nsIDOMKeyEvent.idl | 1 + widget/cocoa/TextInputHandler.h | 1 + widget/cocoa/TextInputHandler.mm | 2 ++ 4 files changed, 5 insertions(+) diff --git a/content/events/public/nsVKList.h b/content/events/public/nsVKList.h index 25285b0f07c..6c3b82c4305 100644 --- a/content/events/public/nsVKList.h +++ b/content/events/public/nsVKList.h @@ -34,6 +34,7 @@ DEFINE_VK_INTERNAL(_PAUSE), DEFINE_VK_INTERNAL(_CAPS_LOCK), DEFINE_VK_INTERNAL(_KANA), DEFINE_VK_INTERNAL(_HANGUL), +DEFINE_VK_INTERNAL(_EISU), DEFINE_VK_INTERNAL(_JUNJA), DEFINE_VK_INTERNAL(_FINAL), DEFINE_VK_INTERNAL(_HANJA), diff --git a/dom/interfaces/events/nsIDOMKeyEvent.idl b/dom/interfaces/events/nsIDOMKeyEvent.idl index 5712e1759be..b77da56332d 100644 --- a/dom/interfaces/events/nsIDOMKeyEvent.idl +++ b/dom/interfaces/events/nsIDOMKeyEvent.idl @@ -56,6 +56,7 @@ interface nsIDOMKeyEvent : nsIDOMUIEvent const unsigned long DOM_VK_CAPS_LOCK = 0x14; const unsigned long DOM_VK_KANA = 0x15; const unsigned long DOM_VK_HANGUL = 0x15; + const unsigned long DOM_VK_EISU = 0x16; // Japanese Mac keyboard only const unsigned long DOM_VK_JUNJA = 0x17; const unsigned long DOM_VK_FINAL = 0x18; const unsigned long DOM_VK_HANJA = 0x19; diff --git a/widget/cocoa/TextInputHandler.h b/widget/cocoa/TextInputHandler.h index 0e300b77db1..20b6eb571b2 100644 --- a/widget/cocoa/TextInputHandler.h +++ b/widget/cocoa/TextInputHandler.h @@ -124,6 +124,7 @@ enum kPowerbookEnterKeyCode = 0x34, // Enter on Powerbook's keyboard is different // IME keys + kJapanese_Eisu = 0x66, kJapanese_Kana = 0x68, kInsertKeyCode = 0x72, // also help key diff --git a/widget/cocoa/TextInputHandler.mm b/widget/cocoa/TextInputHandler.mm index d417e44ddcd..989506bcf4f 100644 --- a/widget/cocoa/TextInputHandler.mm +++ b/widget/cocoa/TextInputHandler.mm @@ -1021,6 +1021,7 @@ TISInputSourceWrapper::ComputeGeckoKeyCode(UInt32 aNativeKeyCode, case kKeypadDivideKeyCode: return NS_VK_DIVIDE; // IME keys + case kJapanese_Eisu: return NS_VK_EISU; case kJapanese_Kana: return NS_VK_KANA; // these may clash with forward delete and help @@ -3860,6 +3861,7 @@ TextInputHandlerBase::IsSpecialGeckoKey(UInt32 aNativeKeyCode) case kTabKeyCode: case kBackspaceKeyCode: + case kJapanese_Eisu: case kJapanese_Kana: case kHomeKeyCode: