|
Adding a new key in MMI
In-order to add a new key in MMI so as to increase the total keys following things should
be done.
• Change TOTAL_KEYS define
• Make entry in PresentAllKeys structure.
• Make entry in the nKeyPadMap structure.
• Make entry in the nKeyToneMap structure.
• Change the skin and also make changes in the device structure for the new image.
• Use SetKeyhandler to register key handlers in the required application screens.
void mmi_frm_set_default_power_onoff_key(void)
{
#ifdef __MMI_POWER_ON_OFF_BY_POWER_KEY__
SetKeyHandler(NULL, KEY_END, KEY_LONG_PRESS);
SetKeyHandler(ShutdownSystemOperation, KEY_POWER, KEY_LONG_PRESS);
#else
SetKeyHandler(ShutdownSystemOperation, KEY_END, KEY_LONG_PRESS);
#endif /* __MMI_POWER_ON_OFF_BY_POWER_KEY__ */
}
、
处理键盘事件
static void KeyEventHandler(KEYBRD_MESSAGE *eventKey) |
|