Where to find TKeyEvent::icode ?
| Tue, 2007-06-19 13:33 | |
|
Hi, in my application I use the OfferKeyEventL() methode to get key press events. To get the event of e.g. the left arrow keys I use EKeyLeftArrow as TKeyEvent::icode. That works good. Regards |
|






Forum posts: 2006
You have to find them by yourself as this is not documented.
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 4
It should be fairly easy to work out the codes for yourself. Create an application that records the codes from the events that it gets, press the keys and see what codes you get. You could also try looking in E32Keys.H
Forum posts: 24
I already did this. This works quite well. But some key presses do not create an event (an iCode). For example the Volume up and Volume down key or the media key from the Nokia N95. I think that they have another priority or something like that, so tha my application is not "allowed" to get these events. How can I change this?
Forum posts: 2006
Then you may have to use the CaptureKey command. (don't remember to which class it belongs to).
You will need SwEvent capability to use this API
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 24
Hi,
now I found a solution how to get acces to some media keys, I use MrccatoCommand(), see also http://www.forum.nokia.com/document/...media_keys.htm
But this does only work for volume up and down keys. Does anybody have a solution how to get access to media keys like Play, Stop, Rewind etc. ?
Forum posts: 85
Hi,
for numbers you could use these codes:
switch (aKeyEvent.iCode) { case '1' : ... case '2' : ... }Do you know the code associated with device's "mouse" push? I know codes for right (EKeyRightArrow), left (EKeyLeftArrow), up (EKeyUpArrow) and down (EKeyDownArrow) shifts, but not when I push it.
Thanks in advance.
Forum posts: 24
Hi,
when you push the button you have to use (EKeyOK).
So with OfferKeyEventL() we are able to get "mouse" events and numerical key events. With MrccatoCommand() we get Volume up and down events. But how to acces media keys?