handle 2 kyes at a time!!

Login to reply to this topic.
Wed, 2007-01-31 16:37
Joined: 2004-07-12
Forum posts: 123
Is it possible to handle 2 keys pressed at the same time in Symbian apps, like in some games ctrl+f??

cheers

Thu, 2007-02-01 11:09
Joined: 2004-05-21
Forum posts: 286
Re: handle 2 kyes at a time!!
Use both TKeyEvent::iModifiers and TKeyEvent::iCode.

Cheers,
Sri

Thu, 2007-02-01 11:18
Joined: 2004-07-12
Forum posts: 123
Re: handle 2 kyes at a time!!
can you be please more illuborative?? an example if any?

thanx
Thu, 2007-02-01 11:31
Joined: 2004-07-12
Forum posts: 123
Re: handle 2 kyes at a time!!
my example of ctrl+f was a random one and i did not mean it on a device literally as most phones do not have ctrl on them. I wanted to have for example * and 2 detected when both are pressed simultaneously.

Thu, 2007-02-01 12:11
Joined: 2006-11-22
Forum posts: 43
Re: handle 2 kyes at a time!!
if you  wolud like to simiulate keypress * and 2  use RWsSession::simulateKeyEvent


hope this will help


KKrish
Thu, 2007-02-01 16:36
Joined: 2004-07-12
Forum posts: 123
Re: handle 2 kyes at a time!!
I read somewhere that this function will call the OfferKeyEvent function which i think should behave similar to HandleWsEventL and HandleKeyEventL. How would thins benefit me?

Thu, 2007-02-01 22:25
Joined: 2004-05-29
Forum posts: 149
Re: handle 2 kyes at a time!!
I remember that when I was making this Series 60 app, there was a method that I had to call on some initialization to tell the OS to let the app receive more than one keypress.  Sorry, though, I don't remember if it was the AppUi, View, or Control initialization, and I can't remember the method name right now  Undecided

-euroq
Mon, 2007-02-05 14:35
Joined: 2005-04-20
Forum posts: 34
Re: handle 2 kyes at a time!!
Hi,

In EPOC version 5 and earlier there was ShortCutkeys present in rss file. I really dont know if they are still supported.

Regards
Pavan

Shoot for the moon. Even if you miss, you'll land among the stars.

Pavan

Thu, 2007-05-03 11:51
Joined: 2005-08-20
Forum posts: 11
Re: handle 2 kyes at a time!!
check out CAknAppUi::SetKeyBlockMode  for S60
Thu, 2007-06-21 15:08
Joined: 2007-06-21
Forum posts: 4
Re: handle 2 kyes at a time!!

When a key is pressed and released an application will get 3 events. A key down event, a character event (if the key press maps to a character) and a key up event. Normally applications only concern themselves with the character events. If you track the key up and downs then you will be able to determine if two keys are down at the same time. For example: If user does: 1. pressed shift key 2. press "t" key, 3. release "t" key, 4. relese shift key. They will get these events from WSERV: key down shift key, key down t key, character event T, key up t key, key up shift key.

  • Login to reply to this topic.