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 250762 1893588af0a5c0dd900cb2369c4f6eb1ba0cac6a
parent 250761 ad11e06bc30c24a8bb96a3f3e769825c89e7d763
child 250763 f0cf1c55172714eaae2330b108746cd6b3894898
push id698
push userjlund@mozilla.com
push dateMon, 23 Mar 2015 22:08:11 +0000
treeherdermozilla-release@b0c0ae7b02a3 [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