×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    May 2003
    Location
    India
    Posts
    136

    Left and right soft key event

    Hi,
    I have created edit box and trying to get event for left and right soft key, but some reason i am getting any event.. But its work fine on emulator


    ////.........creating edit box.....

    TResourceReader reader;
    iCoeEnv->CreateResourceReaderLC( reader, R_VIEW_BOX );
    iGTextEd = new ( ELeave ) CEikGlobalTextEditor;
    iGTextEd->SetContainerWindowL( *this );
    iGTextEd->ConstructFromResourceL( reader );
    CleanupStack::PopAndDestroy();
    iGTextEd->SetAvkonWrap( ETrue );
    iGTextEd->EnableCcpuSupportL( ETrue );
    iGTextEd->SetFocus(EFalse);

    ///...........
    TKeyResponse CContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
    {
    if ( aType != EEventKey )
    {
    return EKeyWasNotConsumed;
    }
    if (aKeyEvent.iCode==EKeyRightArrow)
    {
    iParant->iIndex++;
    //not getting called
    iParant->NextMessgae(iParant->iIndex);
    return EKeyWasConsumed;
    }
    if (aKeyEvent.iCode==EKeyLeftArrow)
    {
    iParant->iIndex--;
    //not getting called
    iParant->NextMessgae(iParant->iIndex);
    return EKeyWasConsumed;
    }
    return CCoeControl::OfferKeyEventL( aKeyEvent, aType );
    }

    I have debugged this code; there is no error in the code. When i press left or right soft key control always in the edit box please suggest me the solution. Thanks
    Thanks
    DB

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: Left and right soft key event

    the softkey buttons are usually mapped into commands, so you could handle them maybe in your appui's command handler function.

  3. #3
    Regular Contributor
    Join Date
    May 2003
    Location
    India
    Posts
    136

    Re: Left and right soft key event

    Thanks symbianyucca, My problem resolved.
    Thanks
    DB

Posting Permissions

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