Hi, I'm try to simulate key press in my application.
The following is part of my code .

/**********************/
void CMyAppkey::SimulateKeyEvent(TInt aCode)
{
TKeyEvent aKeyEvent;
aKeyEvent.iCode = aCode;
aKeyEvent.iScanCode = 0;
aKeyEvent.iModifiers = 0;
aKeyEvent.iRepeats = 0;
iWsSession.SimulateKeyEvent(aKeyEvent);
iWsSession.Flush();
}
/**********************/

By testing this, I can simulate all the numeric keys and arrow keys.
for instance:
iMyAppkey->SimulateKeyEvent(48);// for number 0
iMyAppkey->SimulateKeyEvent(63495);// for left arrow key
iMyAppkey->SimulateKeyEvent(8);// for clear key
iMyAppkey->SimulateKeyEvent(42);// for star key
iMyAppkey->SimulateKeyEvent(63557);// for selection key
iMyAppkey->SimulateKeyEvent(63555);// for right functional key

but I can not simulate press Application key and End key.
I tried like this:
iMyAppkey->SimulateKeyEvent(63570);// for Apps key
iMyAppkey->SimulateKeyEvent(63587);// for End key

Besides invoking SimulateKeyEvent(), I also tried the following code:
/**********************/
void CMyAppkey::SimulateRawEvent(TInt aScanCode)
{
TRawEvent aRawEvent;
aRawEvent.Set(TRawEvent::EKeyDown,aScanCode);
iWsSession.SimulateRawEvent(aRawEvent);
aRawEvent.Set(TRawEvent::EKeyUp,aScanCode);
iWsSession.SimulateRawEvent(aRawEvent);
iWsSession.Flush();
}
/**********************/

iMyAppkey->SimulateRawEvent(180);// for Apps key
iMyAppkey->SimulateRawEvent(197);// for End key

But it doesn't work either!

Can anyone help me to fix it?
thank you.