BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-15-2009, 02:47 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 8800
PIN: N/A
Carrier: Vodafone
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Trackball problem (doesn't work every time)

Please Login to Remove!

Hi. I'm developing an application for Blackberry 8800 and I have a big problem: I have to press the trackball more than once to recognize it and do the action. The value returned when pressing the trackball is:

bb_keyCode_fire = -8



This is the keyPressed method:



protected void keyPressed(int key) {
super.keyPressed(key);

keysPressed = true;
keys |= getQuadGameAction(key);

try {
Thread.sleep(60);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
The getQuadGameAction(key) checks returns a number that has all bits equal to zero, except one that represents that key that has been pressed and it works fine. Maybe someone can give me a hand. Thanks!
Offline  
Old 07-15-2009, 10:23 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would suggest considering capturing the event at trackwheelClick instead
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

20pcs 25V270uF 25V 8x11.5mm Panasonic FK Low Impedance Capacitor
$2.69
20pcs 25V270uF 25V 8x11.5mm Panasonic FK Low Impedance Capacitor picture20pcs 35V180uF 35V 8x15mm ELNA RJH Super Low Impedance Audio Capacitor Black
$3.19
20pcs 35V180uF 35V 8x15mm ELNA RJH Super Low Impedance Audio Capacitor Black picture200pcs 35V180uF 35V 8x15mm ELNA RJH Super Low Impedance Audio Capacitor Black
$19.49
200pcs 35V180uF 35V 8x15mm ELNA RJH Super Low Impedance Audio Capacitor Black picture100pcs 25V120uF 25V 5x15mm Jamicon TL Longlife low impedance capacitor
$6.29
100pcs 25V120uF 25V 5x15mm Jamicon TL Longlife low impedance capacitor picture 4pcs EI-16 Multi-Impedance Audio Transformer 120K:600 ohm 30K:600 ohm e
$34.68
 4pcs EI-16 Multi-Impedance Audio Transformer 120K:600 ohm 30K:600 ohm e picture






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