--- EDIT ---
Version 1.0.5 has been replaced by 1.0.6. Post changed accordingly.
--- /EDIT ---
I've updated the keypress module to version 1.0.6.
* added send_raw_event() function which sends a raw event "behind the window server"; this lets you simulate the application key, red key or number keys on the standby screen - all this don't work using other functions
* unified simulate_key() and simulate_key_mod() functions. They are just different names for the same function now; the modifiers parameter is optional now
* added simulate_event() function which simulates a single EEventKeyUp, EEventKeyDown or EEventKey event, with support for repeats parameter
* rewritten everything based on uikludges module (it had a nice batch files for building and a nicely laid out sources)
Currently there are only 3rd edition builds.
IMPORTANT! Uninstall old (pre-1.0.5) version before installing this one. This is really needed as this one uses a different UID (auto-generated by Ensymble).
Download the sis file and sign it using Open Signed Online for your phone.
Install the signed SIS file.
Make sure your Python Shell or Ped or some other standalone application you're using the keypress module in is also signed.
All exported functions
simulate_key(keycode, scancode [, modifiers])
Simulates a keypress. For keycode, scancode and modifiers, use constants from key_codes module.
simulate_event(event, keycode, scancode [, modifiers [, repeats]])
Simulates a single key-down, key or key-up event. The event parameter is either EEventKeyDown, EEventKey or EEventKeyUp defined in either appuifw or keypress module itself. The keycode, scancode and modifiers params are the same as for the simulate_key(). The repeats i a number of generated auto repeats (an integer).
send_raw_event(event [, param1 [, param2]])
Sends one of the raw events defined in the keypress module (check out c:\resource\keypress.py after installation). Most useful are EKeyUp and EKeyDown. Events with one or two params are supported, the key events use one param which is a scancode of the key (EStdKey*** or EScancode*** defined in key_codes).
Functions kept for compatibility:
simulate_key_mod(keycode, scancode [, modifiers])
Same as simulate_key().
Simulates right softkey press.