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

RIVER CITY 600JL COMMODORE PVC/NON-WOVENPOLY/NYLON JACKET YELLOW
$47.82
RIVER CITY 600JL COMMODORE PVC/NON-WOVENPOLY/NYLON JACKET YELLOW pictureVM110 VIC-20 Programmers Reference Guide, Commodore Business Machines
$9.99
VM110 VIC-20 Programmers Reference Guide, Commodore Business Machines pictureMOS 325572-01 Commodore 1541 40-PIN Gate Array (x1)
$7.0
MOS 325572-01 Commodore 1541 40-PIN Gate Array (x1) pictureMOS 901227-03 Commodore 64 C64 Kernal ROM (x1)
$8.0
MOS 901227-03 Commodore 64 C64 Kernal ROM (x1) pictureDDC IEEE-448 DATA BUS ADAPTER ILC DEVICE DBA-488 HPIB GPIB COMMODORE HP USED
$712.5
DDC IEEE-448 DATA BUS ADAPTER ILC DEVICE DBA-488 HPIB GPIB COMMODORE HP USED picture






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