Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User hitesh_1's Avatar
    Join Date
    May 2012
    Posts
    23
    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 vineet.jain's Avatar
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,861
    Check if the code enters the following condition for N97:


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

  3. #3
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    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 C++
    Replies: 3
    Last Post: 2009-04-28, 11:10
  4. Key press not working........
    By saurabh2801 in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved