×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    6

    Green Key Capture

    Hi,

    I want to capture the Green Key on my application.

    Using OfferKeyEventL function I get the iScanCode as EStdKeyYes.

    There are two different views where I need to handle the Green Key Press.

    For e.g. If you are in First View, On first press of Green Key, Activate the Second view. If Green Key Press is detected in second view Display a message. But for me in the first view if I press Green key the application immediately activates the view and displays the message as well.

    Following is my code on capturing Green Key

    Code:
    if(aKeyEvent.iScanCode == EStdKeyYes)
     {
       ActivateView(firstView);
       return EKeyWasConsumed;
     }
    Also, if I debug the application (using breakpoints), it works fine in sequence. Does it mean something related to Delay in processing and activating view ?
    Regards,
    /nirav

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Green Key Capture

    If you check the second argument of OfferKeyEventL, you will find that a single keypress invokes your method 3 times: "keydown", "key" and "keyup". And all three times you get the same value in iScanCode. You can either check iCode (which is 0 on the keydown and keyup events), or check the event-type.

Similar Threads

  1. capture short key and long key
    By kkrish in forum Symbian
    Replies: 4
    Last Post: 2010-02-09, 04:48
  2. Capture Key double click
    By morost in forum Symbian
    Replies: 1
    Last Post: 2008-05-22, 12:23
  3. not getting send (call or green) key event
    By vasant21 in forum Symbian
    Replies: 2
    Last Post: 2007-01-09, 17:31
  4. Capture Long Key
    By kkrish in forum Symbian
    Replies: 3
    Last Post: 2006-11-30, 06:19
  5. 7710: Key Capture
    By silverparasol in forum Symbian
    Replies: 1
    Last Post: 2005-07-08, 09:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×