Namespaces
Variants
Actions

Filtering standard Symbian shortcut key behavior

Jump to: navigation, search



Article Metadata

Compatibility
Platform(s): S60 2nd Edition
S60 3rd Edition

Article
Created: User:Technical writer 2 (21 Sep 2006)
Last edited: hamishwillee (14 Jun 2012)

Overview

Filtering standard S60 shortcut key behavior

Description

Some key combinations in S60 have a standard predefined behavior. For example, in QWERTY-keyboard devices, CTRL+C /CTRL+V perform the function of copy/paste. Some applications may want to override this. The following solution demonstrates how an application can override the behavior of any shortcut key.

Solution

To override this functionality, you have to override the HandleWsEventL() function in the AppUi class (CEikAppUi). The overridden function should handle the required combinations, and pass all other key combinations to the framework by calling base class implementation of HandleWsEventL().
For example, filtering out all shortcuts using the Ctrl key could be done as follows:
void CMyAppUi::HandleWsEventL(
    const TWsEvent& aEvent,
    CCoeControl* aDestination)
    {
    if ((aEvent.Key()->iModifiers &
        (EModifierCtrl |
         EModifierLeftCtrl |
         EModifierRightCtrl)) != 0)
       {
        // Do nothing
       }
    else
      {
      CAknAppUi::HandleWsEventL(aEvent,aDestination);
      }
    }

This page was last modified on 14 June 2012, at 09:36.
83 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved