BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-24-2009, 03:39 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default how to simulate key?

Please Login to Remove!

hi,

i know that there are functions which represents down and up positions of key-keyUp and keyDown. but they do not work as should. in api it is written that keyDown "Represents a constant indicating that the key is in the down position." but as i try to use it in my application, i realized that keyDown does not represent only a key in a down position but fully click- so down and up..

is there any way that i could simulate key in a down position?

kind regards
Offline  
Old 03-24-2009, 03:45 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

what i need to do is simulate shortcut of two keys pressed-> alt + arrow.

So, i must at first simulate alt in a down position, hold it, then simulate arrow click and then release alt key.

is there any chance i can do it?
Offline  
Old 03-24-2009, 07:59 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

it looks like such a code may work:

EventInjector.KeyCodeEvent _e = new EventInjector.KeyCodeEvent(
EventInjector.KeyCodeEvent.KEY_DOWN,
(char)Keypad.KEY_ESCAPE,
KeypadListener.STATUS_ALT,
500
);

_e.post();

but, when i'm in my application it works only as 'escape'. when i'm in foreground (main screen of my device) this code works as i wanted-as a shortcut of alt+escape(arrow).

Can anyone know why? how can i do that this shortcut works also in my application?

kind regards
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

IBM Actionwriter Printwheels OEM New Lot of 9
$79.99
IBM Actionwriter Printwheels OEM New Lot of 9 pictureVIDEO CABLE OEM IBM ACTIONMEDIA II 69F9737
$39.95
VIDEO CABLE OEM IBM ACTIONMEDIA II 69F9737 pictureNEW OEM IBM SELECTRIC III TYPEWRITER PART PAPER BAIL ARMS ORIGINAL NOS
$9.99
NEW OEM IBM SELECTRIC III TYPEWRITER PART PAPER BAIL ARMS ORIGINAL NOS pictureIBM 1299790 Quiet Non-Correcting Ribbon for Quietwriter Typewriters, Black, OEM
$10.0
IBM 1299790 Quiet Non-Correcting Ribbon for Quietwriter Typewriters, Black, OEM pictureIBM SELECTRIC TYPEWRITER PART (NEW IBM BRAND) MOTOR DRIVE BELT OEM #1124812
$16.49
IBM SELECTRIC TYPEWRITER PART (NEW IBM BRAND) MOTOR DRIVE BELT OEM #1124812 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.