Bug 1121878 - Map Copy, Cut, ChannelDown, ChannelUp and MediaFastForward to proper WM_APPCOMMAND message. r=smaug, r=jimm, a=lmandel
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 16 Jan 2015 21:15:06 +0900
changeset 249321 0281145a7ef5634eb2140e42dc6776f639d21bda
parent 249320 1b5f44480b65c054c3184981346edc27a84868c6
child 249322 35b50154de3ba962cf1a5be050e41ef48c21db9b
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, jimm, lmandel
bugs1121878
milestone37.0a2
Bug 1121878 - Map Copy, Cut, ChannelDown, ChannelUp and MediaFastForward to proper WM_APPCOMMAND message. r=smaug, r=jimm, a=lmandel
widget/NativeKeyToDOMKeyName.h
--- a/widget/NativeKeyToDOMKeyName.h
+++ b/widget/NativeKeyToDOMKeyName.h
@@ -293,24 +293,26 @@ KEY_MAP_ANDROID (Backspace, AKEYCODE_DEL
 KEY_MAP_WIN     (Clear, VK_CLEAR)
 KEY_MAP_WIN     (Clear, VK_OEM_CLEAR)
 KEY_MAP_COCOA   (Clear, kVK_ANSI_KeypadClear)
 KEY_MAP_GTK     (Clear, GDK_Clear)
 KEY_MAP_QT      (Clear, Qt::Key_Clear)
 KEY_MAP_ANDROID (Clear, AKEYCODE_CLEAR)
 
 // Copy
+KEY_MAP_WIN_CMD (Copy, APPCOMMAND_COPY)
 KEY_MAP_GTK     (Copy, GDK_Copy)
 KEY_MAP_QT      (Copy, Qt::Key_Copy)
 
 // CrSel
 KEY_MAP_WIN     (CrSel, VK_CRSEL)
 KEY_MAP_GTK     (CrSel, GDK_3270_CursorSelect) // legacy IBM keyboard layout
 
 // Cut
+KEY_MAP_WIN_CMD (Cut, APPCOMMAND_CUT)
 KEY_MAP_GTK     (Cut, GDK_Cut)
 KEY_MAP_QT      (Cut, Qt::Key_Cut)
 
 // Delete
 KEY_MAP_WIN     (Delete, VK_DELETE)
 KEY_MAP_COCOA   (Delete, kVK_PC_Delete)
 KEY_MAP_GTK     (Delete, GDK_Delete)
 KEY_MAP_GTK     (Delete, GDK_KP_Delete)
@@ -1180,19 +1182,21 @@ KEY_MAP_QT      (AudioBassBoostUp, Qt::K
 
 // 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
@@ -1216,16 +1220,17 @@ KEY_MAP_QT      (Dimmer, Qt::Key_Brightn
 
 // Guide
 KEY_MAP_ANDROID (Guide, AKEYCODE_GUIDE)
 
 // Info
 KEY_MAP_ANDROID (Info, AKEYCODE_INFO)
 
 // MediaFastForward
+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