March 8, 2011

borut123 borut123
Lab Rat
72 posts

QML, Keys.onPressed

 

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.

8 replies

March 9, 2011

derick derick
Lab Rat
3 posts

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.

March 21, 2011

moo1 moo1
Lab Rat
33 posts

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???

March 23, 2011

moo1 moo1
Lab Rat
33 posts

Okay, I did some search and found a bug report for this Enable key capture and remcon interfaces for Qt apps on Symbian [bugreports.qt.nokia.com] , 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 [wiki.forum.nokia.com] 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.

March 29, 2011

borut123 borut123
Lab Rat
72 posts

You could use the Symbian Remote Control API to catch keypress events in C++ and then send signals to QML.

March 29, 2011

mario mario
Lab Rat
240 posts

moo1: Place the code on the wiki

April 1, 2011

moo1 moo1
Lab Rat
33 posts

I created a new wiki entry and put code there. Getting Audio Volume Key Event on Symbian Devices [developer.qt.nokia.com]

April 30, 2011

ezust ezust
Lab Rat
2 posts

That link seems to be no good. Try to upload again, and maybe put some text on the page too, please?

May 1, 2011

paulo paulo
Hobby Entomologist
174 posts

Try this link Getting Audio Volume Key Event on Symbian Devices [developer.qt.nokia.com] , the next time use the search function of the Wiki.

 
  ‹‹ Hiding some listelement in a section      [Solved] Unable to get PathLine/PathView to display sufficient items ››

You must log in to post a reply. Not a member yet? Register here!