Iscancode and Icode in Symbian

Source: Internet
Author: User
Tags comments

We know that the following methods are used in Symbian key event handling:

Tkeyresponse cmegajoycontainer::offerkeyeventl (const tkeyevent& akeyevent, Teventcode aType)

This method is a virtual function defined in Ccoecontrol (Control base class from which all other controls are derived), which is defined as follows:

Offerkeyeventl () virtual Tkeyresponse offerkeyeventl (const tkeyevent& akeyevent,teventcode atype);

Description

Handles key events.

If a control is wishes to process key events, it should implement the This function. The implementation must ensure that function returns

Ekeywasnotconsumed

If it does does anything in response to a key event-otherwise, the other controls or dialogs May is prevented from Receivi Ng the key event. If it is able to process the event it should return

Ekeywasconsumed

.

Comments:

If a control wants to handle a key event, it should implement this function. If the control does nothing with a keystroke event, the function's implementation must ensure that the function returns to Ekeywasnotconsumed. Otherwise, other controls or dialog boxes (in the control stack) may not receive key events. If this control can handle key events, it should return ekeywasconsumed.

When a key event is occurs, the control framework calls this function for each control stack, until one of the M can process the key event (and returns

Ekeywasconsumed

).

Comments:

When a keystroke event occurs, the control framework invokes the Offerkeyeventl method of each control on the control stack until one of them can handle the key event (and return ekeywasconsumed).

Parameters

Const tkeyevent& Akeyevent

The key event.

Teventcode Atype

The type of key event:

Eeventkey

,

Eeventkeyup

Or

Eeventkeydown

.

return value

Tkeyresponse

Indicates whether or not the key event is used by this control.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.