Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

 

I am finding problem with IKeysConfig_GetStickyKeys API. Below is my code snippet:

int nErr;

unit32 dwStickyKeys;


    if((nErr = ISHELL_CreateInstance(pIShell, AEECLSID_KeysMapping, (void**)&pIKeysMapping)) == SUCCESS)
    {
        if((nErr = IKeysMapping_QueryInterface(pIKeysMapping, AEEIID_IKeysConfig,
                    (void **)&pIKeysConfig)) == SUCCESS)
        {
            if((nErr = IKeysConfig_GetStickyKeys(pIKeysConfig, &dwStickyKeys)) != SUCCESS)
            {
                DBG_MSG("**IKeysConfig_GetStickyKeys FAILED**");   
            }
        }
    }

    if(nErr != SUCCESS)
    {
        DBG_MSG("IKeysConfig may not be supported on the device");
    }

I am able to create the instance of IKeysMapping and queryInterface for IKeysConfig. But when I call IKeysConfig_GetStickyKeys API, it always returns value 32768 (invalid value). 

I am using:

BREW MP 1.0.3.692

Target: Sapphire

 

Let me know if I am missing out something.

recheck did u get 32768 or 327680. i got a 327680 (i.e. hex: 0x50000 )on - BREW MP 1.0.3.692,  Target: Sapphire.
0x50000 = KB_CAPSLOCK || KB_NUMLOCK.
the list of supported Keys are ORed to each other & may be checked as below:
if(dwStickyKeys && KB_CAPSLOCK == KB_CAPSLOCK) {
DBGPRINTF("CAPS LOCK is Stiky");
}

if(dwStickyKeys && KB_NUMLOCK == KB_NUMLOCK) {
DBGPRINTF("NUM LOCK is Sticky");
}

 

recheck did u get 32768 or 327680. i got a 327680 (i.e. hex: 0x50000 )on - BREW MP 1.0.3.692,  Target: Sapphire.
0x50000 = KB_CAPSLOCK || KB_NUMLOCK.
the list of supported Keys are ORed to each other & may be checked as below:
if(dwStickyKeys && KB_CAPSLOCK == KB_CAPSLOCK) {
DBGPRINTF("CAPS LOCK is Stiky");
}

if(dwStickyKeys && KB_NUMLOCK == KB_NUMLOCK) {
DBGPRINTF("NUM LOCK is Sticky");
}