Bug 755903 - Map the hardware camera shutter button to a key event [r=mwu]
authorFabrice Desré <fabrice@mozilla.com>
Wed, 16 May 2012 14:52:44 -0700
changeset 94142 10c12811006914f1920408a78e0a11198b975943
parent 94141 d4068b54381a26e8b0d3423da48d03a86c6b0aa8
child 94143 ee9e7fe2c448eb69c0c3bf875b82aa0605070856
push id9491
push userfdesre@mozilla.com
push dateWed, 16 May 2012 21:53:02 +0000
treeherdermozilla-inbound@10c128110069 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwu
bugs755903
milestone15.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 755903 - Map the hardware camera shutter button to a key event [r=mwu]
widget/gonk/nsAppShell.cpp
--- a/widget/gonk/nsAppShell.cpp
+++ b/widget/gonk/nsAppShell.cpp
@@ -256,16 +256,19 @@ maybeSendKeyEvent(int keyCode, bool pres
         sendKeyEvent(NS_VK_SLEEP, pressed, timeMs);
         break;
     case KEY_VOLUMEUP:
         sendKeyEvent(NS_VK_PAGE_UP, pressed, timeMs);
         break;
     case KEY_VOLUMEDOWN:
         sendKeyEvent(NS_VK_PAGE_DOWN, pressed, timeMs);
         break;
+    case KEY_CAMERA:
+        sendKeyEvent(NS_VK_PRINTSCREEN, pressed, timeMs);
+        break;
     default:
         VERBOSE_LOG("Got unknown key event code. type 0x%04x code 0x%04x value %d",
                     keyCode, pressed);
     }
 }
 
 class GeckoInputReaderPolicy : public InputReaderPolicyInterface {
     InputReaderConfiguration mConfig;