BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-20-2009, 10:57 AM   #1 (permalink)
New Member
 
Join Date: Dec 2008
Model: 8310
PIN: N/A
Carrier: Unknow
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Programming keyboard shortcuts (hotkeys)

Please Login to Remove!

Hello everybody!

I need to program keyboard shortcuts (hotkeys) in my application. I have seen this feature on Google Maps, miuTunes and ÜberTwitter.

A code snippet sample would be highly appreciated.
Offline  
Old 05-21-2009, 10:31 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Feb 2009
Model: 9000
PIN: N/A
Carrier: T-Mobile
Posts: 67
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

override keyChar in your screen class:

protected boolean keyChar(char key, int status, int time) {
boolean retval = false;
switch (key) {
case Characters.ESCAPE:
//do something
return true;
default:
retval = super.keyChar(key, status, time);
}
return retval;
}

Last edited by hippocamp software : 05-21-2009 at 10:32 AM.
Offline  
Old 05-21-2009, 11:33 AM   #3 (permalink)
New Member
 
Join Date: Dec 2008
Model: 8310
PIN: N/A
Carrier: Unknow
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Programming keyboard shortcuts (hotkeys) [Solved]

Quote:
Originally Posted by hippocamp software View Post
override keyChar in your screen class:

protected boolean keyChar(char key, int status, int time) {
boolean retval = false;
switch (key) {
case Characters.ESCAPE:
//do something
return true;
default:
retval = super.keyChar(key, status, time);
}
return retval;
}
Thanks it worked! (Y)
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

(20 PCS) SI9410DY SILICONIX Trans MOSFET N-CH 30V 7A 8-Pin SOIC N
$8.95
(20 PCS) SI9410DY SILICONIX Trans MOSFET N-CH 30V 7A 8-Pin SOIC N  picture2Pcs Reflective Optical Sensor Cny70 With Transistor Output New Ic G
$0.99
2Pcs Reflective Optical Sensor Cny70 With Transistor Output New Ic G picture500Pcs Fsc/Vishay/Mic Do-41 Uf4007 1 Amp 1Kv Ultra Fast Diode Ic New R
$8.57
500Pcs Fsc/Vishay/Mic Do-41 Uf4007 1 Amp 1Kv Ultra Fast Diode Ic New R picture30Pcs Smd-Transistor Diotec 6C Or 6Ct 45V 800Ma 310 Sot-23 Bc817-40 Npn New Ic E
$1.38
30Pcs Smd-Transistor Diotec 6C Or 6Ct 45V 800Ma 310 Sot-23 Bc817-40 Npn New Ic E pictureLot of 2 x (2) ETCO 2N123 NOS TESTED
$16.0
Lot of 2 x  (2) ETCO 2N123  NOS TESTED picture






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