Hi Ricky!
Please have a look into one of the main.c files that we provide within our Build Environments. There you will find the following function:
static XEnum GetKeyCommand( void )
{
#ifdef USE_TERMINAL_INPUT
switch ( EwBspGetCharacter())
{
case 0x65 : EwPrint("Key 'Exit' pressed\n"); return CoreKeyCodeExit;
case 0x38 : EwPrint("Key 'Up' pressed\n"); return CoreKeyCodeUp;
case 0x32 : EwPrint("Key 'Down' pressed\n"); return CoreKeyCodeDown;
case 0x36 : EwPrint("Key 'Right' pressed\n"); return CoreKeyCodeRight;
case 0x34 : EwPrint("Key 'Left' pressed\n"); return CoreKeyCodeLeft;
case 0x35 : EwPrint("Key 'OK' pressed\n"); return CoreKeyCodeOk;
case 0x6D : EwPrint("Key 'Menu' pressed\n"); return CoreKeyCodeMenu;
case 0x70 : EwPrint("Key 'Power' pressed\n"); return CoreKeyCodePower;
}
#endif
return CoreKeyCodeNoKey;
}
As you can see, this function is prepared to get key codes from the terminal - just adpat this implementation to convert your key events instead of the received key code. Instead of getting some key code from EwBspGetCharacter() call your driver to detect key hits.
I hope this helps...
Best regards,
Manfred