×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2004
    Location
    Belgium
    Posts
    8

    CEikEdwin and OfferKeyEventL

    Hello,

    I derived my own class from CEikEdwin and implemented my own OfferKeyEventL(). The reason why I did this is because some other actions need to be performed when a letter is typed in.

    The implementation of the OfferKeyEventL() looks like this:

    TKeyResponse CEditorView::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
    {
    if (aType==EEventKey)
    {
    // Do some extra stuff
    }
    }

    The problem I have is that aType is never equal to EEventKey. So the extra code is never executed. The letters do appear in the CEikEdwin.

    Greetings,
    Tom

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    why don't you just have the edwin in a container in your app and handle the keys in the container before you forward them to the edwin ?

    yucca

  3. #3
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    yeah exactly, I'm using something like this quite successfully:
    Code:
    TKeyResponse CMyContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
    {
    
    switch ( aKeyEvent.iScanCode )
        {
        case EStdKeyUpArrow:
        //do some stuff
        break;
        default:
        break;
        }
    
    return iEdwin->OfferKeyEventL(aKeyEvent, aType);
    }

  4. #4
    Registered User
    Join Date
    Apr 2007
    Posts
    2

    Re: CEikEdwin and OfferKeyEventL

    Quote Originally Posted by sopta007 View Post
    yeah exactly, I'm using something like this quite successfully:
    Code:
    TKeyResponse CMyContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
    {
    
    switch ( aKeyEvent.iScanCode )
        {
        case EStdKeyUpArrow:
        //do some stuff
        break;
        default:
        break;
        }
    
    return iEdwin->OfferKeyEventL(aKeyEvent, aType);
    }
    Hi,

    Did you find any solution to this problem? Any pointers to this will be of great help since I am also facing the same problem.

    Thanks
    Priya

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

    Re: CEikEdwin and OfferKeyEventL

    did you also remember to add the container in to the control stack in the appui class ?

    yucca

Posting Permissions

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