×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    23

    Redkey press not working on N97

    hi

    i have developed a application in Symbian.i want application should be exit on pressing redkey
    for this i am using following code

    TKeyResponse ClassName::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
    {
    if(aType == EEventKey)
    {
    switch(aKeyEvent.iScanCode)
    {
    case EStdKeyNo:
    {
    User::Exit(0);
    return EKeyWasConsumed;
    }
    break;

    }
    }
    return EKeyWasNotConsumed;
    }

    this code is work fine on Nokia E-71,5233,N79,N95

    But it is not working for Nokia N-97

    please help me ,how i can exit my application on redkey press on N97

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,025

    Re: Redkey press not working on N97

    Check if the code enters the following condition for N97:


    switch(aKeyEvent.iScanCode)
    {
    case EStdKeyNo:
    {
    }

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,688

    Re: Redkey press not working on N97

    Exiting on the Red key is the default behaviour since S60 3rd edition. It is expected to happen without adding any code, you may want to try with a HelloWorld/freshly generated code.
    Since the N97 has a foil-based "button", it may be worth testing if the "button" really works.

    Side note: User::Exit is not a good way to exit an application, prefer the Exit function in the AppUi. From other classes (like CCoeControl-derived ones) you can still access it as CEikonEnv::Static()->AppUi()->Exit().

Similar Threads

  1. changing the redkey behaviour
    By ragu. in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 1
    Last Post: 2011-01-25, 11:42
  2. Replies: 2
    Last Post: 2009-11-24, 14:57
  3. E65 redkey bug !!!
    By rokroff in forum Symbian
    Replies: 3
    Last Post: 2009-04-28, 11:10
  4. Key press not working........
    By saurabh2801 in forum Symbian
    Replies: 0
    Last Post: 2007-05-10, 07:43

Posting Permissions

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