Developer

API Reference

IKeysMapping

Brew Release
Brew MP 1.0.2
See Also
AEECLSID_KeysMapping IKeysMapping_QueryInterface IKeysMapping_GetMapping
Description
This interface allows an application to query the meaning of a key combination on extended keypads

The following header file is required:
AEEKeysMapping.h
Usage

Extended keypad layouts are not standard, a key combination may have a different interpretation on different handsets. For example, [shift] + [A] can mean “#” on one handset and “*” on another. To be generic, Applications can call IKeysMapping_GetMapping to get the mapping of the primary key and modifier on the device they are running on.
Below is an example of how an application would use this interface.
As an example, on a handset where "A" and "*" are on the same key, and when Symbol and A are pressed together, it means "*", if user presses A while holding Symbol, BREW will post EVT_KEY_PRESS event with wParam as AVK_A and dwParam as KB_SYMBOL. Then application can call IKeysMapping_GetMapping with these two values (wParam and dwParam) to get resulting mapping which will be "*".

boolean App_HandleEvent(
)
{
  switch( eCode )
     case EVT_KEY:
       if ( dwParam )
      {
        AECHAR mapping;
          
         if ( AEE_SUCCESS != IKeysMapping_GetMapping(KeyMapping,
                   wParam, dwParam, &mapping))
              return FALSE;
       
          //Use mapping
          //

      }
}

  • Follow