|
keyStatus() invokation -
03-30-2007, 07:58 PM
Hi,
I understand that keyStatus() is invoked when either of the ALT or SHIFT status changes. What options are there for me to change the ALT or SHIFT status programatically? My application has hotkeys which I want to invoke from a list the person can select (so they don't have to actually press the sequence of buttons) and then the sequence can be programatically inputted to the device.
Is this possible with ALT and SHIFT, which are the two status buttons?
I thought that to do ALT and SHIFT would be as simple as invoking a EventInjector.KeyCodeEvent, but that seemed not to work. Here was what I tried:
int keycode = Keypad.keycode(Keypad.map(Keypad.KEY_ALT),KeyList ener.STATUS_NOT_FROM_KEYPAD);
EventInjector.KeyCodeEvent e = new EventInjector.KeyCodeEvent(EventInjector.KeyEvent .KEY_DOWN, Keypad.map(Keypad.key(keycode),Keypad.status(keyc ode)),Keypad.status(keycode), 15);
e.post();
//I also tried invokeEvent(), but it didn't work either. This is detected by //keyDown(), but the ALT status does not actually change.
Any ideas?
Thanks,
Dallan
|