Where to find TKeyEvent::icode ?

Login to reply to this topic.
Tue, 2007-06-19 13:33
Joined: 2007-05-30
Forum posts: 24

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.
But where can I find the code for e.g the numbers 0-9?
Concerning the Nokia N95, can I use the music keys, what is their code?

Regards


Tue, 2007-06-19 15:46
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2006
Re: Where to find TKeyEvent::icode ?

You have to find them by yourself as this is not documented.


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Thu, 2007-06-21 10:58
Joined: 2007-06-21
Forum posts: 4
Re: Where to find TKeyEvent::icode ?

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

Thu, 2007-06-21 14:21
Joined: 2007-05-30
Forum posts: 24
Re: Where to find TKeyEvent::icode ?

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?

Thu, 2007-06-21 14:50
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2006
Re: Where to find TKeyEvent::icode ?

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

Tue, 2007-06-26 07:30
Joined: 2007-05-30
Forum posts: 24
Re: Where to find TKeyEvent::icode ?

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

Tue, 2007-06-26 09:59
Joined: 2006-10-17
Forum posts: 85
Re: Where to find TKeyEvent::icode ?

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.

Tue, 2007-06-26 10:40
Joined: 2007-05-30
Forum posts: 24
Re: Where to find TKeyEvent::icode ?

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?

  • Login to reply to this topic.