Developer

API Reference

IKeysConfig

Brew Release
Brew MP 1.0.2
See Also
AEECLSID_KeysMapping IKeysMapping
Description
This interface provides services to get and set the state of sticky keys on the device.
The following header file is required:
AEEKeysConfig.h
Usage
IKeysConfig interface can be used to set and get the state of sticky keys, such as Capslock/Numlock on the device. Note that any key modifier key, such as shift, can be designated as sticky by OEMs.
The example below demonstrates the usage of IKeysConfig to find out which sticky keys are available, and then set and get the state of Caps lock key, if it is available. The example assumes that an instance of IKeysConfig is already created.
 int nErr;
 uint32 dwStickyKeys;
 boolean bState;

 nErr = IKeysConfig_GetStickyKeys(piKeysConfig, &dwStickyKeys);

 if(AEE_SUCCESS != nErr) {
    // Handle error ... 
    return;
 }

 if(dwStickyKeys & KB_CAPSLOCK) {
    nErr = IKeysConfig_SetKeyState(piKeysConfig, KB_CAPSLOCK, TRUE);

    if(AEE_SUCCESS != nErr) {
       // Handle error ...
       return;
    }

    nErr = IKeysConfig_GetKeyState(piKeysConfig, KB_CAPSLOCK, &bState);

    if(AEE_SUCCESS != nErr) {
       // Handle error ...
       return;
    }

    // bState now contains TRUE
 }
  • Follow