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

HP 4291A Rev3.00 RF Impedance/ Material Analyzer w/ Opts 1C2 001 002
$4000.0
HP 4291A Rev3.00 RF Impedance/ Material Analyzer w/ Opts 1C2 001 002  picture1360-PCS HIGH IMPEDENCE FERRITE BEAD HZ0805E601R-00 0805E601R00 HZ0805E601R00
$47.36
1360-PCS HIGH IMPEDENCE FERRITE BEAD HZ0805E601R-00 0805E601R00 HZ0805E601R00 pictureAD5933 1 MSPS, 12 Bit Impedance Converter Network Analyzer AD5933YRSZ USA ADI
$12.0
AD5933 1 MSPS, 12 Bit Impedance Converter Network Analyzer  AD5933YRSZ  USA ADI picture10 -Acre Ac Low Impedance Charger Agricultural Livestock Electric Fence Chargers
$49.26
10 -Acre Ac Low Impedance Charger Agricultural Livestock Electric Fence Chargers pictureRigol ADP0150BNC 50 Ohm Impedance Adapter
$29.77
Rigol ADP0150BNC 50 Ohm Impedance Adapter picture






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