Capture event when flip is openen or closed

Login to reply to this topic.
Tue, 2007-07-10 15:46
Joined: 2007-05-30
Forum posts: 24

Hi,

I have an N95 and I want to capture key event, when the flip is opened or closed. But the flip doesn´t generate a TKeyEvent::iCode in my OfferKeyEventL() methode. But due to switching on light when flip is open, the phone can recognize this somehow. But how can I get this event?

Regards


Wed, 2007-07-11 04:09
Joined: 2006-07-26
Forum posts: 27
Re: Capture event when flip is openen or closed

See answer in my blog, http://www.symbian.net.cn/blog/post/9.html. Hope this helps.


Taking you forward.

Wed, 2007-07-11 09:07
Joined: 2007-05-30
Forum posts: 24
Re: Capture event when flip is openen or closed

Thank you, that helped.

But because I need Symbian signed for your solution I found another one, that is enough for my issues, because I only want to capture if flip is opened; I don´t want to block the default application that appears, if it is opened. For those who are interested, here my solution:
It`s quite simple. In OfferKeyEventL() methode, you check if TKeyEvent == EKeyEventUp, because flip and slider activities generate an EKeyEventUp. Because in EKeyEventUp events the TKeyEvent.iCode always is 0, you have to check the TKeyEvent.iScanCode which is !=0, so that you can specify if flip or slider are opened.

Regards!

  • Login to reply to this topic.