BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-08-2008, 06:57 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Keycode from characters

Please Login to Remove!

Hi, i have searched in the forum an found this here:
Code:
public boolean keyChar(char key, int status, int time) {
        System.out.println("> "+key+" | "+time + " | " + status+" | "+ Keypad.keycode(key, status));
        return false;
    }
Now, i get this here:
Quote:
> F | 340740 | 4587554
> f | 341330 | 0
> f | 341915 | 0
> F | 342390 | 4587554
why is the keycode for the lowercase 'F' = 0 ?
How can i get the keycode for all available keys?

thanks hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Old 04-08-2008, 08:44 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
Posts: 150
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is something wrong here. You print key, time, status and then keycode, so the "0" result in the output is the status, not the keycode.
Offline  
Old 04-09-2008, 02:50 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

right, but i want to have the Keycode for the pressed key... but i found this one here:
Code:
 public boolean keyChar(char key, int status, int time) {
        int keycode = (int)key;
so i get the ascii key
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Old 04-09-2008, 03:10 AM   #4 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

take a look at
net.rim.device.api.system.Characters

hth,
simon
__________________
java developer, Devinto, hamburg/germany
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

NEW Parker Flow Control Valve F3112EHC19A 24V Solenoid
$20.0
NEW Parker Flow Control Valve F3112EHC19A 24V Solenoid pictureHonda S2000 04 05 06 07 08 09 F22C1 2.2 PCX Engine VTEC Solenoid OEM
$85.0
Honda S2000 04 05 06 07 08 09 F22C1 2.2 PCX Engine VTEC Solenoid OEM picture(Lot of 4) SMC Pneumatic SYJ3140-5LOZ Solenoid Valves w/ Parker R25-02E Push Lok
$79.99
(Lot of 4) SMC Pneumatic SYJ3140-5LOZ Solenoid Valves w/ Parker R25-02E Push Lok pictureNEW FESTO MFH-5/3G-D-1-B SOLENOID VALVE 10BAR, 145PSI MFH-5/3G-D-1 B
$88.95
NEW FESTO MFH-5/3G-D-1-B SOLENOID VALVE 10BAR, 145PSI MFH-5/3G-D-1 B pictureNew: M16D76 Solenoid Timer
$32.99
New: M16D76 Solenoid Timer picture






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