Symbian
Symbian OS Library

[Index][spacer]



0
 

Classification: C++ Category: Base
Created: 10/08/99 Modified: 09/11/2002
Number: FAQ-0292
Platform: Not Applicable

Question:
I'd like to simulate a keypress when an event happens. e.g. when an object receives a mouse click, I'd like to pretend that the EStdKeyBacklightOn key is pressed.

Is there any way for an app to generate a keypress event to the system?


Answer:
You need to use the function:
    RWsSession::SimulateRawEvent(TRawEvent aEvent)
    Strictly speaking this function is currently only supported for test code use. However in practice it is being used in several EPOC platform implementations, so is likely to continue to be supported in future.