BlackBerryForums.com : Your Number One BlackBerry Community      

»Sponsored Links




Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
Ivanov Offline
Talking BlackBerry Encyclopedia
 
Posts: 200
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Default Keypress detection without listener - 06-30-2008, 04:33 AM

Is it possible to find out which keys are currently pressed without implementing the KeyListener?

What I want ot do is to check in MakeMenu if a specific key is pressed to add the additional MenuItem which will be normally not displayed.
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
irlennard Offline
Knows Where the Search Button Is
 
irlennard's Avatar
 
Posts: 31
Join Date: Jan 2008
Location: Berlin
Model: 9000
Carrier: T-Mobile
Default 06-30-2008, 05:15 AM

In your MainScreen (or other Screen subclass) you could try overriding:

Code:
boolean keyDown(char key, int status, int time)
or

Code:
boolean keyControl(char key, int status, int time)
Then save the state of the key you're interested in. Just make sure you call super in your function.

-- Ian

Last edited by irlennard : 06-30-2008 at 05:18 AM.
   
Reply With Quote
Reply


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-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1