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

Allen Bradley, SLC 500, 1747-M13, 64K Flash EEPROM Memory, Good Condition
$79.95
Allen Bradley, SLC 500, 1747-M13, 64K Flash EEPROM Memory, Good Condition picture5Pcs 24Lc256-I/P 24Lc256i/P 24Lc256 Eeprom Dip New Ic H
$2.32
5Pcs 24Lc256-I/P 24Lc256i/P 24Lc256 Eeprom Dip New Ic H picture20Pcs At24c256c-Sshl-T Eeprom Sserial 256Kb At At24c256 Sop-8 Ic New A
$5.33
20Pcs At24c256c-Sshl-T Eeprom Sserial 256Kb At At24c256 Sop-8 Ic New A picture5Pcs At24c256 Serial I2c Interface Eeprom Data Storage Module Arduino Pic New U
$5.38
5Pcs At24c256 Serial I2c Interface Eeprom Data Storage Module Arduino Pic New U pictureCH341A STC FLASH 24 25 EEPROM BIOS Writer USB Programmer SPI USB To TTL
$2.67
CH341A STC FLASH 24 25 EEPROM BIOS Writer USB Programmer SPI USB To TTL picture






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