Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: fepbase.h
Link against: fepbase.lib

FEP_START_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L

#define FEP_START_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L(aFep, aKeyEvent, aEventCode)\
    {\
    if ((aFep).IsSimulatingKeyEvent())\
        {\
        return EKeyWasNotConsumed;\
        }\
    (aFep).OnStartingHandlingKeyEvent_NoDownUpFilterLC();\
    if ((aEventCode)==EEventKey)\
        {\
        if ((aFep).IsTurnedOnByL(aKeyEvent) || (aFep).IsTurnedOffByL(aKeyEvent))\
            {\
            return (aFep).OnFinishingHandlingKeyEvent_NoDownUpFilterL((aEventCode), (aKeyEvent), EKeyWasConsumed);\
            }\
        if (!(aFep).IsOn())\
            {\
            return (aFep).OnFinishingHandlingKeyEvent_NoDownUpFilterL((aEventCode), (aKeyEvent), EKeyWasNotConsumed);\
            }\
        }\
    }

Support

Supported from 6.1

Description

Macro to be called by a keyboard-based FEP at the start of its CCoeControl::OfferKeyEventL()-overriding function.

It causes events that turn the FEP on or off to be consumed. This variant of the macro ignores key up and key down events so that it should be used in preference to FEP_START_KEY_EVENT_HANDLER_L in the rare cases where the FEP wishes to handle EEventKeyDown or EEventKeyUp events. If the FEP is simulating key events, or is off, no key events are consumed and OfferKeyEventL() returns with EKeyWasNotConsumed.

This should be the first thing called in the OfferKeyEventL() function. The FEP_END_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L macro should be used to return from the function.

Parameters

aFep

The FEP that owns the control implementing OfferKeyEventL().

aKeyEvent

The key event (of type TKeyEvent), as passed to OfferKeyEventL().

aEventCode

The key event code (of type TEventCode), as passed to OfferKeyEventL().