Bug 1343451 - part 1: Declare (DOM|NS)_VK_PROCESSKEY for keyCode value during composition r?smaug draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 01 Mar 2017 15:41:43 +0900
changeset 766626 60ee152577c925075495c87beb6345e06c32f5f3
parent 766625 0c649d8ac575c2dead182639f4cac12c720ba218
child 766627 5014c861df0e174a0174ce17ba44ae3babe42680
push id102374
push usermasayuki@d-toybox.com
push dateTue, 13 Mar 2018 06:34:13 +0000
reviewerssmaug
bugs1343451
milestone61.0a1
Bug 1343451 - part 1: Declare (DOM|NS)_VK_PROCESSKEY for keyCode value during composition r?smaug When native key event is handled by IME, we should set keyCode to 0xE5 (229, VK_PROCESS of virtual keycode of Windows) for behaving same as the other browsers. This patch declares it same as other keyCode values. MozReview-Commit-ID: 666bB1qOEgv
dom/events/VirtualKeyCodeList.h
dom/webidl/KeyEvent.webidl
--- a/dom/events/VirtualKeyCodeList.h
+++ b/dom/events/VirtualKeyCodeList.h
@@ -207,16 +207,19 @@ DEFINE_VK_INTERNAL(_BACK_SLASH)
 DEFINE_VK_INTERNAL(_CLOSE_BRACKET)
 DEFINE_VK_INTERNAL(_QUOTE)
 
 DEFINE_VK_INTERNAL(_META)
 DEFINE_VK_INTERNAL(_ALTGR)
 
 DEFINE_VK_INTERNAL(_WIN_ICO_HELP)
 DEFINE_VK_INTERNAL(_WIN_ICO_00)
+
+DEFINE_VK_INTERNAL(_PROCESSKEY)
+
 DEFINE_VK_INTERNAL(_WIN_ICO_CLEAR)
 DEFINE_VK_INTERNAL(_WIN_OEM_RESET)
 DEFINE_VK_INTERNAL(_WIN_OEM_JUMP)
 DEFINE_VK_INTERNAL(_WIN_OEM_PA1)
 DEFINE_VK_INTERNAL(_WIN_OEM_PA2)
 DEFINE_VK_INTERNAL(_WIN_OEM_PA3)
 DEFINE_VK_INTERNAL(_WIN_OEM_WSCTRL)
 DEFINE_VK_INTERNAL(_WIN_OEM_CUSEL)
--- a/dom/webidl/KeyEvent.webidl
+++ b/dom/webidl/KeyEvent.webidl
@@ -190,16 +190,22 @@ interface KeyEvent
 
   const unsigned long DOM_VK_META           = 0xE0;
   const unsigned long DOM_VK_ALTGR          = 0xE1;
 
   // OEM specific virtual keyCode of Windows should pass through DOM keyCode
   // for compatibility with the other web browsers on Windows.
   const unsigned long DOM_VK_WIN_ICO_HELP    = 0xE3;
   const unsigned long DOM_VK_WIN_ICO_00      = 0xE4;
+
+  // IME processed key.
+  const unsigned long DOM_VK_PROCESSKEY      = 0xE5;
+
+  // OEM specific virtual keyCode of Windows should pass through DOM keyCode
+  // for compatibility with the other web browsers on Windows.
   const unsigned long DOM_VK_WIN_ICO_CLEAR   = 0xE6;
   const unsigned long DOM_VK_WIN_OEM_RESET   = 0xE9;
   const unsigned long DOM_VK_WIN_OEM_JUMP    = 0xEA;
   const unsigned long DOM_VK_WIN_OEM_PA1     = 0xEB;
   const unsigned long DOM_VK_WIN_OEM_PA2     = 0xEC;
   const unsigned long DOM_VK_WIN_OEM_PA3     = 0xED;
   const unsigned long DOM_VK_WIN_OEM_WSCTRL  = 0xEE;
   const unsigned long DOM_VK_WIN_OEM_CUSEL   = 0xEF;