Bug 1116762 - Add MozHomeScreen key name for home button. r=masayuki
authorSean Lin <selin@mozilla.com>
Thu, 08 Jan 2015 11:29:54 +0800
changeset 223241 1893588af0a5c0dd900cb2369c4f6eb1ba0cac6a
parent 223240 ad11e06bc30c24a8bb96a3f3e769825c89e7d763
child 223242 f0cf1c55172714eaae2330b108746cd6b3894898
push id28084
push usercbook@mozilla.com
push dateMon, 12 Jan 2015 14:05:26 +0000
treeherdermozilla-central@ee55ebb9d533 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1116762
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1116762 - Add MozHomeScreen key name for home button. r=masayuki
dom/events/KeyNameList.h
widget/NativeKeyToDOMKeyName.h
--- a/dom/events/KeyNameList.h
+++ b/dom/events/KeyNameList.h
@@ -24,16 +24,17 @@
  * Special Key Values
  *****************************************************************************/
 DEFINE_KEYNAME_WITH_SAME_NAME(Unidentified)
 
 /******************************************************************************
  * Our Internal Key Values (must have "Moz" prefix)
  *****************************************************************************/
 DEFINE_KEYNAME_INTERNAL(PrintableKey, "MozPrintableKey")
+DEFINE_KEYNAME_INTERNAL(HomeScreen, "MozHomeScreen")
 
 /******************************************************************************
  * Modifier Keys
  *****************************************************************************/
 DEFINE_KEYNAME_WITH_SAME_NAME(Alt)
 DEFINE_KEYNAME_WITH_SAME_NAME(AltGraph)
 DEFINE_KEYNAME_WITH_SAME_NAME(CapsLock)
 DEFINE_KEYNAME_WITH_SAME_NAME(Control)
--- a/widget/NativeKeyToDOMKeyName.h
+++ b/widget/NativeKeyToDOMKeyName.h
@@ -1284,16 +1284,23 @@ KEY_MAP_ANDROID (TVPower, AKEYCODE_TV_PO
 
 // VideoModeNext
 KEY_MAP_GTK     (VideoModeNext, GDK_Next_VMode)
 
 // ZoomToggle
 KEY_MAP_WIN     (ZoomToggle, VK_ZOOM)
 KEY_MAP_QT      (ZoomToggle, Qt::Key_Zoom)
 
+/******************************************************************************
+ * Keys not defined by any standards
+ ******************************************************************************/
+
+// HomeScreen
+KEY_MAP_ANDROID (HomeScreen, AKEYCODE_HOME)
+
 #undef KEY_MAP_WIN
 #undef KEY_MAP_WIN_JPN
 #undef KEY_MAP_WIN_KOR
 #undef KEY_MAP_WIN_OTH
 #undef KEY_MAP_WIN_CMD
 #undef KEY_MAP_COCOA
 #undef KEY_MAP_GTK
 #undef KEY_MAP_QT