Comment 2 for bug 1451724

Revision history for this message
Michael Zanetti (mzanetti) wrote :

Hey Ugo, Bill,

I have tested the linked branch. 2 issues:

* My BQ is running out of space and produces the "Low disk space" warning when the camera app starts up. That seems to steal focus which forces me to first swipe to the foto roll and back to the viewfinder in order to fix the focus things.

* Second, don't ask me why, but that exact same selfie stick I tried half a year ago, now seems to produce this keycode: 0x1008FF16 which isn't listed in the Qt namespace. However, it is listed in xkbcommon-keysyms.h and is mapped to XKB_KEY_XF86AudioPrev. To make things even weirder, I have to add that this is on krillin. Last time I tested it on flo. However, I retested it on flo right now and believe it or not, it's XKB_KEY_XF86AudioMedia (0x1008FF32) now. I've also tested that same stick on an iPhone, it will increase the sound volume when the camera app was not focused. So this means that the generated keycode depends on the hardware drivers, in our case the Android HAL. Different devices and versions of the Android image can change the produced keycode.

This makes me believe that we should just handle all common multimedia keys in the camera app to trigger the shutter. If we add those keys, I guess we should support most of the cases:

0x1008FF14 (XKB_KEY_XF86AudioPlay)
0x1008FF15 (XKB_KEY_XF86AudioStop)
0x1008FF16 (XKB_KEY_XF86AudioPrev)
0x1008FF17 (XKB_KEY_XF86AudioNext)
0x1008FF31 (XKB_KEY_XF86AudioPause)
0x1008FF32 (XKB_KEY_XF86AudioMedia)

Qt::Key_MediaPlay 0x01000080
Qt::Key_MediaStop 0x01000081
Qt::Key_MediaPrevious 0x01000082
Qt::Key_MediaNext 0x01000083
Qt::Key_MediaRecord 0x01000084
Qt::Key_MediaPause 0x1000085
Qt::Key_MediaTogglePlayPause 0x1000086