QML, Keys.onPressed
-
wrote on 7 Mar 2011, 23:03 last edited by
Hi
Is it possible to detect volume up/down keys in QML on Symbian 3?
I've been trying to get any key press feedback in QML. But nothing happens, no key event is triggered at all.Keys.onPressed: { console.log("key has been pressed"); }
Although, on Windows 7 the same QML code works as expected.
-
wrote on 9 Mar 2011, 05:18 last edited by
To answer your first question. No, hardware volume keys are not currently mapped to Qt::Key_volumeUp/Down.
If you don't get any feedback on any key presses you should file a bug for S^3.
-
wrote on 21 Mar 2011, 20:12 last edited by
I have the same issue on Symbian 3 (N8), and it seems even Qt C++ cannot receive key events for volume up/down! Can anyone explain why???
-
wrote on 22 Mar 2011, 23:57 last edited by
Okay, I did some search and found a bug report for this "Enable key capture and remcon interfaces for Qt apps on Symbian":http://bugreports.qt.nokia.com/browse/QTBUG-4415 , but this looks like left for more than a year and doesn't look promising.
Meanwhile, I did some more search and it seems only way is to use "Symbian Remote Control API":http://wiki.forum.nokia.com/index.php/TSS000432_-_Utilising_media_keys and somehow wrap it as QDeclarativeItem. I'm happy to share the code snippet if somebody is interested but not sure where's the proper place.
-
wrote on 29 Mar 2011, 13:42 last edited by
You could use the Symbian Remote Control API to catch keypress events in C++ and then send signals to QML.
-
wrote on 29 Mar 2011, 13:54 last edited by
moo1: Place the code on the wiki
-
wrote on 31 Mar 2011, 23:58 last edited by
I created a new wiki entry and put code there. "Getting Audio Volume Key Event on Symbian Devices":http://developer.qt.nokia.com/wiki/AudioVolumeKeyEventOnSymbian
-
wrote on 30 Apr 2011, 16:31 last edited by
That link seems to be no good. Try to upload again, and maybe put some text on the page too, please?
-
wrote on 1 May 2011, 01:54 last edited by
Try this link "Getting Audio Volume Key Event on Symbian Devices":http://developer.qt.nokia.com/wiki/Audio_Volume_Key_Event_On_Symbian , the next time use the search function of the Wiki.