Bug 1133741 - Add camera focus hardware button. r=masayuki
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Fri, 20 Feb 2015 00:06:00 -0500
changeset 257212 9c1093e7a12869757de39c7aad2b330836d195d9
parent 257211 63f519fc7fe94db830c95cde574c410b04a68f66
child 257213 bc27856e15f54c44e6261a825fd36df271e1beab
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1133741
milestone38.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 1133741 - Add camera focus hardware button. r=masayuki
dom/events/KeyNameList.h
widget/NativeKeyToDOMKeyName.h
widget/android/nsWindow.cpp
--- a/dom/events/KeyNameList.h
+++ b/dom/events/KeyNameList.h
@@ -25,16 +25,17 @@
  *****************************************************************************/
 DEFINE_KEYNAME_WITH_SAME_NAME(Unidentified)
 
 /******************************************************************************
  * Our Internal Key Values (must have "Moz" prefix)
  *****************************************************************************/
 DEFINE_KEYNAME_INTERNAL(PrintableKey, "MozPrintableKey")
 DEFINE_KEYNAME_INTERNAL(HomeScreen, "MozHomeScreen")
+DEFINE_KEYNAME_INTERNAL(CameraFocusAdjust, "MozCameraFocusAdjust")
 
 /******************************************************************************
  * 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
@@ -1296,16 +1296,20 @@ KEY_MAP_QT      (ZoomToggle, Qt::Key_Zoo
 
 /******************************************************************************
  * 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)
+
 #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
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1370,17 +1370,16 @@ ConvertAndroidKeyCodeToKeyNameIndex(Andr
             return KEY_NAME_INDEX_USE_STRING;
 
         case AKEYCODE_SOFT_LEFT:
         case AKEYCODE_SOFT_RIGHT:
         case AKEYCODE_CALL:
         case AKEYCODE_ENDCALL:
         case AKEYCODE_NUM:                // XXX Not sure
         case AKEYCODE_HEADSETHOOK:
-        case AKEYCODE_FOCUS:
         case AKEYCODE_NOTIFICATION:       // XXX Not sure
         case AKEYCODE_PICTSYMBOLS:
 
         case AKEYCODE_BUTTON_A:
         case AKEYCODE_BUTTON_B:
         case AKEYCODE_BUTTON_C:
         case AKEYCODE_BUTTON_X:
         case AKEYCODE_BUTTON_Y: