BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 06-29-2009, 06:07 AM   #1 (permalink)
New Member
 
Join Date: Jun 2009
Model: 8100
PIN: N/A
Carrier: airtel
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Green key press programatically

Please Login to Remove!

Hi,
I have tired with below code but i could not able to press the green key .Please help me where am i wrong?
Quote:
EventInjector.KeyCodeEvent pressEndKey = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN,
(char)Keypad.key(1114112), KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
EventInjector.KeyCodeEvent releaseEndKey = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_UP,
(char)Keypad.key(1114112), KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
EventInjector.invokeEvent(pressEndKey);
EventInjector.invokeEvent(releaseEndKey);
Thanks,
Offline  
Old 08-18-2009, 06:53 AM   #2 (permalink)
New Member
 
Join Date: Jul 2009
Model: 8130
PIN: N/A
Carrier: Mobilink
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

For giving programatically permission your should do the following settings:
Go to Options -> Advanced Options -> Applications > Press Menu key > Modules > select your application > Press Menu key > Edit Permissions > Expand Interaction option-> set to allow keystrokeinjection permission.

Then try this piece of code:
EventInjector.KeyCodeEvent pressEndKey = new
EventInjector.KeyCodeEvent(
KeyCodeEvent.KEY_DOWN,( char)
Keypad.KEY_SEND,0,100);

EventInjector.KeyCodeEvent releaseEndKey =
new EventInjector.KeyCodeEvent(
KeyCodeEvent.KEY_UP,(char)
Keypad.KEY_SEND,0,100);

try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
EventInjector.invokeEvent(pressEndKey);
EventInjector.invokeEvent(releaseEndKey);
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

(VTG) 1984 P & H Harnischfeger yellow hard hat Dec 1st birthday bash milwaukee
$24.99
(VTG) 1984 P & H Harnischfeger yellow hard hat Dec 1st birthday bash milwaukee pictureVINTAGE DIGITAL EQUIPMENT CORPORATION(DEC) 32MB PC MEMORY BOARD 5017155-01 E1P1
$149.0
VINTAGE DIGITAL EQUIPMENT CORPORATION(DEC) 32MB PC MEMORY BOARD 5017155-01 E1P1  pictureVintage Rare DEC 1073D / 1996 JD3487 H 9833
$49.99
Vintage Rare DEC 1073D  / 1996 JD3487 H 9833    pictureVTG Smead BLUE Jan - Dec Index Card Guides No. 621-12 Months 6" x 4" Dividers
$9.99
VTG Smead BLUE Jan - Dec Index Card Guides No. 621-12 Months  62018 Vintage Floral pattern Flowers Fringe Planner Agenda Aug 2017-Dec 2018
$32.0
2018 Vintage Floral pattern Flowers Fringe Planner Agenda Aug 2017-Dec 2018 picture






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