×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    216

    Red face E65 redkey bug !!!

    hi all
    i have Nokia E65 , my application need to handle redkey button and i use this code to handle :
    Code:
    if (aKeyEvent.iScanCode == EStdKeyNo) //Key code for red key.
       {
           //My handle here
       }
    i test this code on Nokia N73 and works fine but not work on E65 !!!! wat's wrong ??
    also i tried to print any code when any key pressed occur , on N73 redkey = 197 but on E65 does not print any code ....
    can any one give me an example for handling redkey button on E65 ?
    thanks in advance

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: E65 redkey bug !!!

    How exactly are you capturing the key though?

    You can try :-

    Code:
    //Capture the RED Key
    TInt iHandlers = (CEikonEnv::Static()->RootWin().CaptureKey(EStdKeyNo, 0, 0));
    TInt iUpAndDownHandlers = (iEikonEnv->RootWin().CaptureKeyUpAndDowns( EStdKeyNo, 0, 0 ));
    And then in the HandleWsEventL of your appui, you should handle the action :-

    Code:
    CYourAppUi::HandleWsEventL (const TWsEvent &aEvent, CCoeControl *aDestination)
    {
    TInt key = aEvent.Key()->iScanCode;
    if(EStdKeyNo == key && aEvent.Type() == EEventKeyDown)
          {
          //Handle the key here and return so that the FW doesnt get the key otherwise it would force your app to background/exit
          }

  3. #3
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    216

    Re: E65 redkey bug !!!

    [QUOTE=mayankkedia;579055]How exactly are you capturing the key though?

    You can try :-

    Code:
    //Capture the RED Key
    TInt iHandlers = (CEikonEnv::Static()->RootWin().CaptureKey(EStdKeyNo, 0, 0));
    TInt iUpAndDownHandlers = (iEikonEnv->RootWin().CaptureKeyUpAndDowns( EStdKeyNo, 0, 0 ));
    thanks mayankkedia , could you tell me where can i put those two line on my code ?

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: E65 redkey bug !!!

    It would depend on your use case as to where and in what scenario you want to capture the red key, if you want to capture it always you can put it in the ConstructL of the AppUi, and if you want to disable red key capture you can use :-

    Code:
    iEikonEnv->RootWin().CancelCaptureKey(iHandlers);
    iEikonEnv->RootWin().CancelCaptureKeyUpAndDowns(iUpAndDownHandlers);
    Cheers,
    Mayank

    P.S. I am assuming you have the SwEvent capability.

Similar Threads

  1. E65 and player
    By sweetsweet24 in forum Mobile Java General
    Replies: 0
    Last Post: 2008-12-10, 08:35
  2. Bug ScreenSaver E50 & E65
    By alucine in forum Series 40 & S60 Platform Feedback Archive
    Replies: 2
    Last Post: 2007-05-26, 17:45
  3. Bug ScreenSaver E50 & E65
    By alucine in forum Symbian
    Replies: 0
    Last Post: 2007-04-12, 09:36
  4. A bug: setColor with offscreen graphics - PLEASE, REPLY THIS TIME
    By palmcrust in forum Mobile Java General
    Replies: 11
    Last Post: 2003-12-04, 12:43
  5. Firmware bug or code bug displaying list on 3650
    By blackjack75 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-09-24, 19:52

Posting Permissions

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