×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    17

    how to pass an event that I capture to the operating system so that it takes over

    I whant pass the event of white button captured by my aplication to the system
    I caught the white button event (menu in 5800) and as the case may
    want to consume or not the event. but my application consumes it forever! or at least does not pass the event to s.o. to treat it as if I had not captured

    in my case when the condition is false, I want the operating system takes over the event as usual :
    by pressing the white menu will display the applications menu or if I keep pressing the white button then show me the application switcher. but my application don´t pass the event!!

    this is what I did:

    void CUnlockContainer::ConstructL( const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver ) {
    ...
    iEikonEnv->SetSystem(ETrue );
    // set application priority to foreground priority even if it goes to background
    iEikonEnv->WsSession().ComputeMode(RWsSession:: EPriorityControlComputeOn);
    // Make the application a high priority application
    iEikonEnv->RootWin().EnableReceiptOfFocus( ETrue);
    iEikonEnv->RootWin().SetOrdinalPosition( 0, ECoeWinPriorityNormal);
    iHashKeyHandle= iEikonEnv->RootWin().CaptureKeyUpAndDowns(EStdKeyHash, 0,0 );
    iHotKey = CEikonEnv::Static()->RootWin().CaptureKey(EKeyApplication0, 0,0);
    }



    TKeyResponse CUnlockContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType ){
    if (condition){
    lock();
    return EKeyWasConsumed;
    }
    return EKeyWasNotConsumed;
    }


    I also tested with :
    return CCoeControl::OfferKeyEventL( aKeyEvent, aType );


    please help me . Thank you in advance

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

    Re: how to pass an event that I capture to the operating system so that it takes over

    Captured events are not forwarded automatically to the original recipient. An RWsSession::GetFocusWindowGroup+SendEventToWindowGroup can help.
    However for having the event itself, it is better to handle it in HandleWsEventL. You can certainly find something in the Wiki and #27 of http://www.developer.nokia.com/Commu...is-key-capture also contains a shorter example.

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    17

    Re: how to pass an event that I capture to the operating system so that it takes over

    I tried what you say, but don't work, maybe because i'm working with s60v5 ??? i tried in a new clean proyect and neither works.
    any suggestions??

    anyway thank you very much

  4. #4
    Registered User
    Join Date
    Oct 2011
    Posts
    17

    Re: how to pass an event that I capture to the operating system so that it takes over

    ok. I found the solution in this thread : http://www.developer.nokia.com/Commu...618#post686618

    clarified that there is no need to implement everything that is there . I use only "OfferKeyEventL" and works fine for my. I need not use any other type of handlers !!

    I hope this can be useful for someone else

Similar Threads

  1. Operating System Versions
    By pakkami22 in forum Symbian
    Replies: 2
    Last Post: 2008-07-28, 05:33
  2. operating system corrupt for 6820
    By leonine in forum Mobile Java General
    Replies: 2
    Last Post: 2007-04-14, 20:09
  3. Replies: 1
    Last Post: 2004-04-30, 08:51
  4. What is Operating System of 8310 ?
    By caruzo in forum Symbian
    Replies: 1
    Last Post: 2002-11-25, 11:23
  5. Win NT 4.0 vs WIN 95/98 operating system
    By vuorte in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-08-28, 09:56

Posting Permissions

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