Bug 1232919 part.2 Reorganize NativeKeyToDOMKeyName.h for using same definition order of the latest UI Events KeyboardEvent key values r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 13 May 2016 18:49:46 +0900
changeset 337338 31b5b7eb5c2aefa3718f36aa751db4214eec7440
parent 337337 6268a66617311b0298e6c3a75e4ef4dd5466d77c
child 337339 433e9c41bd91eceff678551a23bc2ee8b771e270
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1232919
milestone49.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 1232919 part.2 Reorganize NativeKeyToDOMKeyName.h for using same definition order of the latest UI Events KeyboardEvent key values r=smaug MozReview-Commit-ID: ANBe57BbVgb
widget/NativeKeyToDOMKeyName.h
--- a/widget/NativeKeyToDOMKeyName.h
+++ b/widget/NativeKeyToDOMKeyName.h
@@ -427,20 +427,16 @@ KEY_MAP_ANDROID (ZoomOut, AKEYCODE_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)
 
 // LogOff
 KEY_MAP_GTK     (LogOff, GDK_LogOff)
 KEY_MAP_QT      (LogOff, Qt::Key_LogOff)
@@ -880,16 +876,24 @@ KEY_MAP_QT      (F34, Qt::Key_F34)
 
 // F35
 KEY_MAP_GTK     (F35, GDK_F35 /* same as GDK_R15 */)
 KEY_MAP_QT      (F35, Qt::Key_F35)
 
 /******************************************************************************
  * Multimedia Keys
  ******************************************************************************/
+// ChannelDown
+KEY_MAP_WIN_CMD (ChannelDown, APPCOMMAND_MEDIA_CHANNEL_DOWN)
+KEY_MAP_ANDROID (ChannelDown, AKEYCODE_CHANNEL_DOWN)
+
+// ChannelUp
+KEY_MAP_WIN_CMD (ChannelUp, APPCOMMAND_MEDIA_CHANNEL_UP)
+KEY_MAP_ANDROID (ChannelUp, AKEYCODE_CHANNEL_UP)
+
 // Close
 // NOTE: This is not a key to close disk tray, this is a key to close document
 //       or window.
 KEY_MAP_WIN_CMD (Close, APPCOMMAND_CLOSE)
 KEY_MAP_GTK     (Close, GDK_Close)
 KEY_MAP_QT      (Close, Qt::Key_Close)
 
 // MailForward
@@ -902,26 +906,45 @@ KEY_MAP_WIN_CMD (MailReply, APPCOMMAND_R
 KEY_MAP_GTK     (MailReply, GDK_Reply)
 KEY_MAP_QT      (MailReply, Qt::Key_Reply)
 
 // MailSend
 KEY_MAP_WIN_CMD (MailSend, APPCOMMAND_SEND_MAIL)
 KEY_MAP_GTK     (MailSend, GDK_Send)
 KEY_MAP_QT      (MailSend, Qt::Key_Send)
 
+// MediaPause
+KEY_MAP_WIN_CMD (MediaPause, APPCOMMAND_MEDIA_PAUSE)
+KEY_MAP_GTK     (MediaPause, GDK_AudioPause)
+KEY_MAP_QT      (MediaPause, Qt::Key_MediaPause)
+KEY_MAP_ANDROID (MediaPause, AKEYCODE_MEDIA_PAUSE)
+
+// MediaPlay
+KEY_MAP_WIN_CMD (MediaPlay, APPCOMMAND_MEDIA_PLAY)
+KEY_MAP_GTK     (MediaPlay, GDK_AudioPlay)
+KEY_MAP_QT      (MediaPlay, Qt::Key_MediaPlay)
+KEY_MAP_ANDROID (MediaPlay, AKEYCODE_MEDIA_PLAY)
+
 // MediaPlayPause
 KEY_MAP_WIN     (MediaPlayPause, VK_MEDIA_PLAY_PAUSE)
 KEY_MAP_WIN_CMD (MediaPlayPause, APPCOMMAND_MEDIA_PLAY_PAUSE)
 KEY_MAP_QT      (MediaPlayPause, Qt::Key_MediaTogglePlayPause)
 KEY_MAP_ANDROID (MediaPlayPause, AKEYCODE_MEDIA_PLAY_PAUSE)
 
-// MediaSelect
-KEY_MAP_WIN     (MediaSelect, VK_LAUNCH_MEDIA_SELECT)
-KEY_MAP_WIN_CMD (MediaSelect, APPCOMMAND_LAUNCH_MEDIA_SELECT)
-KEY_MAP_GTK     (MediaSelect, GDK_AudioMedia)
+// MediaRecord
+KEY_MAP_WIN_CMD (MediaRecord, APPCOMMAND_MEDIA_RECORD)
+KEY_MAP_GTK     (MediaRecord, GDK_AudioRecord)
+KEY_MAP_QT      (MediaRecord, Qt::Key_MediaRecord)
+KEY_MAP_ANDROID (MediaRecord, AKEYCODE_MEDIA_RECORD)
+
+// MediaRewind
+KEY_MAP_WIN_CMD (MediaRewind, APPCOMMAND_MEDIA_REWIND)
+KEY_MAP_GTK     (MediaRewind, GDK_AudioRewind)
+KEY_MAP_QT      (MediaRewind, Qt::Key_AudioRewind)
+KEY_MAP_ANDROID (MediaRewind, AKEYCODE_MEDIA_REWIND)
 
 // MediaStop
 KEY_MAP_WIN     (MediaStop, VK_MEDIA_STOP)
 KEY_MAP_WIN_CMD (MediaStop, APPCOMMAND_MEDIA_STOP)
 KEY_MAP_GTK     (MediaStop, GDK_AudioStop)
 KEY_MAP_QT      (MediaStop, Qt::Key_MediaStop)
 KEY_MAP_ANDROID (MediaStop, AKEYCODE_MEDIA_STOP)
 
@@ -956,33 +979,44 @@ KEY_MAP_WIN_CMD (Save, APPCOMMAND_SAVE)
 KEY_MAP_GTK     (Save, GDK_Save)
 KEY_MAP_QT      (Save, Qt::Key_Save)
 
 // SpellCheck
 KEY_MAP_WIN_CMD (SpellCheck, APPCOMMAND_SPELL_CHECK)
 KEY_MAP_GTK     (SpellCheck, GDK_Spell)
 KEY_MAP_QT      (SpellCheck, Qt::Key_Spell)
 
-// VolumeDown
+/******************************************************************************
+ * Audio Keys
+ *****************************************************************************/
+// AudioBassBoostDown
+KEY_MAP_WIN_CMD (AudioBassBoostDown, APPCOMMAND_BASS_DOWN)
+KEY_MAP_QT      (AudioBassBoostDown, Qt::Key_BassDown)
+
+// AudioBassBoostUp
+KEY_MAP_WIN_CMD (AudioBassBoostUp, APPCOMMAND_BASS_UP)
+KEY_MAP_QT      (AudioBassBoostUp, Qt::Key_BassUp)
+
+// VolumeDown (should be renamed to AudioVolumeDown)
 KEY_MAP_WIN     (VolumeDown, VK_VOLUME_DOWN)
 KEY_MAP_WIN_CMD (VolumeDown, APPCOMMAND_VOLUME_DOWN)
 KEY_MAP_COCOA   (VolumeDown, kVK_VolumeDown)
 KEY_MAP_GTK     (VolumeDown, GDK_AudioLowerVolume)
 KEY_MAP_QT      (VolumeDown, Qt::Key_VolumeDown)
 KEY_MAP_ANDROID (VolumeDown, AKEYCODE_VOLUME_DOWN)
 
-// VolumeUp
+// VolumeUp (should be renamed to AudioVolumeUp)
 KEY_MAP_WIN     (VolumeUp, VK_VOLUME_UP)
 KEY_MAP_WIN_CMD (VolumeUp, APPCOMMAND_VOLUME_UP)
 KEY_MAP_COCOA   (VolumeUp, kVK_VolumeUp)
 KEY_MAP_GTK     (VolumeUp, GDK_AudioRaiseVolume)
 KEY_MAP_QT      (VolumeUp, Qt::Key_VolumeUp)
 KEY_MAP_ANDROID (VolumeUp, AKEYCODE_VOLUME_UP)
 
-// VolumeMute
+// VolumeMute (should be renamed to AudioVolumeMute)
 KEY_MAP_WIN     (VolumeMute, VK_VOLUME_MUTE)
 KEY_MAP_WIN_CMD (VolumeMute, APPCOMMAND_VOLUME_MUTE)
 KEY_MAP_COCOA   (VolumeMute, kVK_Mute)
 KEY_MAP_GTK     (VolumeMute, GDK_AudioMute)
 KEY_MAP_QT      (VolumeMute, Qt::Key_VolumeMute)
 KEY_MAP_ANDROID (VolumeMute, AKEYCODE_VOLUME_MUTE)
 
 /******************************************************************************
@@ -1009,16 +1043,21 @@ KEY_MAP_ANDROID (LaunchMail, AKEYCODE_EN
 // GDK_CD is defined as "Launch CD/DVD player" in XF86keysym.h.
 // Therefore, let's map it to media player rather than music player.
 KEY_MAP_GTK     (LaunchMediaPlayer, GDK_CD)
 KEY_MAP_GTK     (LaunchMediaPlayer, GDK_Video)
 KEY_MAP_QT      (LaunchMediaPlayer, Qt::Key_LaunchMedia)
 KEY_MAP_QT      (LaunchMediaPlayer, Qt::Key_CD)
 KEY_MAP_QT      (LaunchMediaPlayer, Qt::Key_Video)
 
+// MediaSelect (should be renamed to LaunchMediaPlayer)
+KEY_MAP_WIN     (MediaSelect, VK_LAUNCH_MEDIA_SELECT)
+KEY_MAP_WIN_CMD (MediaSelect, APPCOMMAND_LAUNCH_MEDIA_SELECT)
+KEY_MAP_GTK     (MediaSelect, GDK_AudioMedia)
+
 // LaunchMusicPlayer
 KEY_MAP_GTK     (LaunchMusicPlayer, GDK_Music)
 KEY_MAP_QT      (LaunchMusicPlayer, Qt::Key_Music)
 KEY_MAP_ANDROID (LaunchMusicPlayer, AKEYCODE_MUSIC)
 
 // LaunchMyComputer
 KEY_MAP_GTK     (LaunchMyComputer, GDK_MyComputer)
 KEY_MAP_GTK     (LaunchMyComputer, GDK_Explorer)
@@ -1165,40 +1204,53 @@ KEY_MAP_ANDROID (BrowserSearch, AKEYCODE
 
 // BrowserStop
 KEY_MAP_WIN     (BrowserStop, VK_BROWSER_STOP)
 KEY_MAP_WIN_CMD (BrowserStop, APPCOMMAND_BROWSER_STOP)
 KEY_MAP_GTK     (BrowserStop, GDK_Stop)
 KEY_MAP_QT      (BrowserStop, Qt::Key_Stop)
 
 /******************************************************************************
+ * Mobile Phone Keys
+ ******************************************************************************/
+// PhoneCall (should be renamed to Call)
+KEY_MAP_ANDROID (PhoneCall, AKEYCODE_CALL)
+
+// Camera
+KEY_MAP_QT      (Camera, Qt::Key_Camera)
+KEY_MAP_ANDROID (Camera, AKEYCODE_CAMERA)
+
+// CameraFocusAdjust (should be renamed to CameraFocus)
+KEY_MAP_QT      (CameraFocusAdjust, Qt::Key_CameraFocus)
+KEY_MAP_ANDROID (CameraFocusAdjust, AKEYCODE_FOCUS)
+
+// HomeScreen (should be renamed to GoHome)
+KEY_MAP_ANDROID (HomeScreen, AKEYCODE_HOME)
+
+/******************************************************************************
+ * TV Keys
+ ******************************************************************************/
+// TV
+KEY_MAP_ANDROID (TV, AKEYCODE_TV)
+
+// TVInput
+KEY_MAP_ANDROID (TVInput, AKEYCODE_TV_INPUT)
+
+// TVPower
+KEY_MAP_ANDROID (TVPower, AKEYCODE_TV_POWER)
+
+/******************************************************************************
  * Media Controller Keys
  ******************************************************************************/
-// AudioBassBoostDown
-KEY_MAP_WIN_CMD (AudioBassBoostDown, APPCOMMAND_BASS_DOWN)
-KEY_MAP_QT      (AudioBassBoostDown, Qt::Key_BassDown)
-
-// AudioBassBoostUp
-KEY_MAP_WIN_CMD (AudioBassBoostUp, APPCOMMAND_BASS_UP)
-KEY_MAP_QT      (AudioBassBoostUp, Qt::Key_BassUp)
-
 // AVRInput
 KEY_MAP_ANDROID (AVRInput, AKEYCODE_AVR_INPUT)
 
 // AVRPower
 KEY_MAP_ANDROID (AVRPower, AKEYCODE_AVR_POWER)
 
-// ChannelDown
-KEY_MAP_WIN_CMD (ChannelDown, APPCOMMAND_MEDIA_CHANNEL_DOWN)
-KEY_MAP_ANDROID (ChannelDown, AKEYCODE_CHANNEL_DOWN)
-
-// ChannelUp
-KEY_MAP_WIN_CMD (ChannelUp, APPCOMMAND_MEDIA_CHANNEL_UP)
-KEY_MAP_ANDROID (ChannelUp, AKEYCODE_CHANNEL_UP)
-
 // ColorF0Red
 KEY_MAP_GTK     (ColorF0Red, GDK_Red)
 KEY_MAP_QT      (ColorF0Red, Qt::Key_Red)
 KEY_MAP_ANDROID (ColorF0Red, AKEYCODE_PROG_RED)
 
 // ColorF1Green
 KEY_MAP_GTK     (ColorF1Green, GDK_Green)
 KEY_MAP_QT      (ColorF1Green, Qt::Key_Green)
@@ -1228,40 +1280,16 @@ KEY_MAP_ANDROID (Info, AKEYCODE_INFO)
 KEY_MAP_WIN_CMD (MediaFastForward, APPCOMMAND_MEDIA_FAST_FORWARD)
 KEY_MAP_GTK     (MediaFastForward, GDK_AudioForward)
 KEY_MAP_QT      (MediaFastForward, Qt::Key_AudioForward)
 KEY_MAP_ANDROID (MediaFastForward, AKEYCODE_MEDIA_FAST_FORWARD)
 
 // MediaLast
 KEY_MAP_QT      (MediaLast, Qt::Key_MediaLast)
 
-// MediaPause
-KEY_MAP_WIN_CMD (MediaPause, APPCOMMAND_MEDIA_PAUSE)
-KEY_MAP_GTK     (MediaPause, GDK_AudioPause)
-KEY_MAP_QT      (MediaPause, Qt::Key_MediaPause)
-KEY_MAP_ANDROID (MediaPause, AKEYCODE_MEDIA_PAUSE)
-
-// MediaPlay
-KEY_MAP_WIN_CMD (MediaPlay, APPCOMMAND_MEDIA_PLAY)
-KEY_MAP_GTK     (MediaPlay, GDK_AudioPlay)
-KEY_MAP_QT      (MediaPlay, Qt::Key_MediaPlay)
-KEY_MAP_ANDROID (MediaPlay, AKEYCODE_MEDIA_PLAY)
-
-// MediaRecord
-KEY_MAP_WIN_CMD (MediaRecord, APPCOMMAND_MEDIA_RECORD)
-KEY_MAP_GTK     (MediaRecord, GDK_AudioRecord)
-KEY_MAP_QT      (MediaRecord, Qt::Key_MediaRecord)
-KEY_MAP_ANDROID (MediaRecord, AKEYCODE_MEDIA_RECORD)
-
-// MediaRewind
-KEY_MAP_WIN_CMD (MediaRewind, APPCOMMAND_MEDIA_REWIND)
-KEY_MAP_GTK     (MediaRewind, GDK_AudioRewind)
-KEY_MAP_QT      (MediaRewind, Qt::Key_AudioRewind)
-KEY_MAP_ANDROID (MediaRewind, AKEYCODE_MEDIA_REWIND)
-
 // PinPToggle
 KEY_MAP_ANDROID (PinPToggle, AKEYCODE_WINDOW)
 
 // RandomToggle
 KEY_MAP_GTK     (RandomToggle, GDK_AudioRandomPlay)
 KEY_MAP_QT      (RandomToggle, Qt::Key_AudioRandomPlay)
 
 // Settings
@@ -1273,46 +1301,26 @@ KEY_MAP_ANDROID (STBInput, AKEYCODE_STB_
 // STBPower
 KEY_MAP_ANDROID (STBPower, AKEYCODE_STB_POWER)
 
 // Subtitle
 KEY_MAP_GTK     (Subtitle, GDK_Subtitle)
 KEY_MAP_QT      (Subtitle, Qt::Key_Subtitle)
 KEY_MAP_ANDROID (Subtitle, AKEYCODE_CAPTIONS)
 
-// TV
-KEY_MAP_ANDROID (TV, AKEYCODE_TV)
-
-// TVInput
-KEY_MAP_ANDROID (TVInput, AKEYCODE_TV_INPUT)
-
-// TVPower
-KEY_MAP_ANDROID (TVPower, AKEYCODE_TV_POWER)
-
 // 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)
-
-// Focus
-KEY_MAP_QT      (CameraFocusAdjust, Qt::Key_CameraFocus)
-KEY_MAP_ANDROID (CameraFocusAdjust, AKEYCODE_FOCUS)
-
-// PhoneCall
-KEY_MAP_ANDROID (PhoneCall, AKEYCODE_CALL)
-
 // SoftLeft
 KEY_MAP_ANDROID (SoftLeft, AKEYCODE_SOFT_LEFT)
 
 // SoftRight
 KEY_MAP_ANDROID (SoftRight, AKEYCODE_SOFT_RIGHT)
 
 #undef KEY_MAP_WIN
 #undef KEY_MAP_WIN_JPN