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





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