Bug 939006 part.6 Sort out key names in Device Keys section r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 04 Jun 2014 21:43:43 +0900
changeset 205829 ee87f878d131dfc268b08f9cab45a48ed01e1aa6
parent 205828 6d7575761c43bdcb3271f8a316929d5eaa88a877
child 205830 385ba5d17d1678bd127dc5f4971f9e912d88524a
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs939006
milestone32.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 939006 part.6 Sort out key names in Device Keys section r=smaug
dom/events/KeyNameList.h
widget/shared/NativeKeyToDOMKeyName.h
--- a/dom/events/KeyNameList.h
+++ b/dom/events/KeyNameList.h
@@ -98,16 +98,31 @@ DEFINE_KEYNAME_WITH_SAME_NAME(Find)
 DEFINE_KEYNAME_WITH_SAME_NAME(Help)
 DEFINE_KEYNAME_WITH_SAME_NAME(Pause)
 DEFINE_KEYNAME_WITH_SAME_NAME(Play)
 // DEFINE_KEYNAME_WITH_SAME_NAME(Props)
 DEFINE_KEYNAME_WITH_SAME_NAME(Select)
 // DEFINE_KEYNAME_WITH_SAME_NAME(ZoomIn)
 // DEFINE_KEYNAME_WITH_SAME_NAME(ZoomOut)
 
+/******************************************************************************
+ * Device Keys
+ *****************************************************************************/
+DEFINE_KEYNAME_WITH_SAME_NAME(BrightnessDown)
+DEFINE_KEYNAME_WITH_SAME_NAME(BrightnessUp)
+DEFINE_KEYNAME_WITH_SAME_NAME(Camera)
+DEFINE_KEYNAME_WITH_SAME_NAME(Eject)
+// DEFINE_KEYNAME_WITH_SAME_NAME(LogOff)
+DEFINE_KEYNAME_WITH_SAME_NAME(Power)
+// DEFINE_KEYNAME_WITH_SAME_NAME(PowerOff)
+DEFINE_KEYNAME_WITH_SAME_NAME(PrintScreen)
+// DEFINE_KEYNAME_WITH_SAME_NAME(Hibernate)
+// DEFINE_KEYNAME_WITH_SAME_NAME(Standby)
+// DEFINE_KEYNAME_WITH_SAME_NAME(WakeUp)
+
 DEFINE_KEYNAME_WITH_SAME_NAME(Apps)
 DEFINE_KEYNAME_WITH_SAME_NAME(F1)
 DEFINE_KEYNAME_WITH_SAME_NAME(F2)
 DEFINE_KEYNAME_WITH_SAME_NAME(F3)
 DEFINE_KEYNAME_WITH_SAME_NAME(F4)
 DEFINE_KEYNAME_WITH_SAME_NAME(F5)
 DEFINE_KEYNAME_WITH_SAME_NAME(F6)
 DEFINE_KEYNAME_WITH_SAME_NAME(F7)
@@ -161,22 +176,16 @@ DEFINE_KEYNAME_WITH_SAME_NAME(LaunchMail
 DEFINE_KEYNAME_WITH_SAME_NAME(List)
 DEFINE_KEYNAME_WITH_SAME_NAME(Soft1)
 DEFINE_KEYNAME_WITH_SAME_NAME(Soft2)
 DEFINE_KEYNAME_WITH_SAME_NAME(Soft3)
 DEFINE_KEYNAME_WITH_SAME_NAME(Soft4)
 DEFINE_KEYNAME_WITH_SAME_NAME(Info)
 DEFINE_KEYNAME_WITH_SAME_NAME(Exit)
 DEFINE_KEYNAME_WITH_SAME_NAME(Zoom)
-DEFINE_KEYNAME_WITH_SAME_NAME(BrightnessDown)
-DEFINE_KEYNAME_WITH_SAME_NAME(BrightnessUp)
-DEFINE_KEYNAME_WITH_SAME_NAME(Camera)
-DEFINE_KEYNAME_WITH_SAME_NAME(Eject)
-DEFINE_KEYNAME_WITH_SAME_NAME(Power)
-DEFINE_KEYNAME_WITH_SAME_NAME(PrintScreen)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserFavorites)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserHome)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserRefresh)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserSearch)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserStop)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserBack)
 DEFINE_KEYNAME_WITH_SAME_NAME(BrowserForward)
 DEFINE_KEYNAME_WITH_SAME_NAME(UpLeft)
--- a/widget/shared/NativeKeyToDOMKeyName.h
+++ b/widget/shared/NativeKeyToDOMKeyName.h
@@ -379,16 +379,50 @@ KEY_MAP_ANDROID (Pause, AKEYCODE_BREAK)
 KEY_MAP_WIN     (Play, VK_PLAY)
 KEY_MAP_GTK     (Play, GDK_3270_Play) // legacy IBM keyboard layout
 KEY_MAP_QT      (Play, Qt::Key_Play)
 
 // Select
 KEY_MAP_WIN     (Select, VK_SELECT)
 KEY_MAP_GTK     (Select, GDK_Select)
 
+/******************************************************************************
+ * Device Keys
+ ******************************************************************************/
+// BrightnessDown
+KEY_MAP_GTK     (BrightnessDown, GDK_MonBrightnessDown)
+KEY_MAP_QT      (BrightnessDown, Qt::Key_MonBrightnessDown)
+
+// BrightnessUp
+KEY_MAP_GTK     (BrightnessUp, GDK_MonBrightnessUp)
+KEY_MAP_QT      (BrightnessUp, Qt::Key_MonBrightnessUp)
+
+// Camera
+KEY_MAP_QT      (Camera, Qt::Key_Camera)
+KEY_MAP_ANDROID (Camera, AKEYCODE_CAMERA)
+
+// Eject
+KEY_MAP_GTK     (Eject, GDK_Eject)
+KEY_MAP_QT      (Eject, Qt::Key_Eject)
+KEY_MAP_ANDROID (Eject, AKEYCODE_MEDIA_EJECT)
+
+// Power
+KEY_MAP_GTK     (Power, GDK_PowerOff)
+KEY_MAP_QT      (Power, Qt::Key_PowerOff)
+KEY_MAP_ANDROID (Power, AKEYCODE_POWER)
+
+// PrintScreen
+KEY_MAP_WIN     (PrintScreen, VK_SNAPSHOT)
+KEY_MAP_GTK     (PrintScreen, GDK_3270_PrintScreen)
+KEY_MAP_GTK     (PrintScreen, GDK_Print)
+KEY_MAP_GTK     (PrintScreen, GDK_Sys_Req)
+KEY_MAP_QT      (PrintScreen, Qt::Key_Print)
+KEY_MAP_QT      (PrintScreen, Qt::Key_SysReq)
+KEY_MAP_ANDROID (PrintScreen, AKEYCODE_SYSRQ)
+
 
 // Apps
 KEY_MAP_ANDROID (Apps, AKEYCODE_APP_SWITCH)
 
 // F1
 KEY_MAP_WIN     (F1, VK_F1)
 KEY_MAP_COCOA   (F1, kVK_F1)
 KEY_MAP_GTK     (F1, GDK_F1)
@@ -681,47 +715,16 @@ KEY_MAP_ANDROID (Info, AKEYCODE_INFO)
 
 // Exit
 KEY_MAP_ANDROID (Exit, AKEYCODE_HOME)
 
 // Zoom
 KEY_MAP_WIN     (Zoom, VK_ZOOM)
 KEY_MAP_QT      (Zoom, Qt::Key_Zoom)
 
-// BrightnessDown
-KEY_MAP_GTK     (BrightnessDown, GDK_MonBrightnessDown)
-KEY_MAP_QT      (BrightnessDown, Qt::Key_MonBrightnessDown)
-
-// BrightnessUp
-KEY_MAP_GTK     (BrightnessUp, GDK_MonBrightnessUp)
-KEY_MAP_QT      (BrightnessUp, Qt::Key_MonBrightnessUp)
-
-// Camera
-KEY_MAP_QT      (Camera, Qt::Key_Camera)
-KEY_MAP_ANDROID (Camera, AKEYCODE_CAMERA)
-
-// Eject
-KEY_MAP_GTK     (Eject, GDK_Eject)
-KEY_MAP_QT      (Eject, Qt::Key_Eject)
-KEY_MAP_ANDROID (Eject, AKEYCODE_MEDIA_EJECT)
-
-// Power
-KEY_MAP_GTK     (Power, GDK_PowerOff)
-KEY_MAP_QT      (Power, Qt::Key_PowerOff)
-KEY_MAP_ANDROID (Power, AKEYCODE_POWER)
-
-// PrintScreen
-KEY_MAP_WIN     (PrintScreen, VK_SNAPSHOT)
-KEY_MAP_GTK     (PrintScreen, GDK_3270_PrintScreen)
-KEY_MAP_GTK     (PrintScreen, GDK_Print)
-KEY_MAP_GTK     (PrintScreen, GDK_Sys_Req)
-KEY_MAP_QT      (PrintScreen, Qt::Key_Print)
-KEY_MAP_QT      (PrintScreen, Qt::Key_SysReq)
-KEY_MAP_ANDROID (PrintScreen, AKEYCODE_SYSRQ)
-
 // BrowserFavorites
 KEY_MAP_WIN     (BrowserFavorites, VK_BROWSER_FAVORITES)
 KEY_MAP_QT      (BrowserFavorites, Qt::Key_Favorites)
 KEY_MAP_ANDROID (BrowserFavorites, AKEYCODE_BOOKMARK)
 
 // BrowserHome
 KEY_MAP_WIN     (BrowserHome, VK_BROWSER_HOME)
 KEY_MAP_GTK     (BrowserHome, GDK_HomePage)