|
|
02-06-2007, 05:31 PM
|
#1
|
Knows Where the Search Button Is
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
|
KeyListener in Background
Please Login to Remove!
Hi,
I was wondering if it is possible to determine if the ALT key is pressed if my screen isnt in the foreground. An example of when this is useful is when the phone application comes up - it turns on the ALT status automatically. My application wants to know when this happens, even if my screen is not in the foreground.
Does anyone know if this is possible?
Thanks,
Dallan
|
Offline
|
|
02-07-2007, 04:23 AM
|
#2
|
CrackBerry Addict
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
|
not looked into it but it seems very unlikely.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
|
Offline
|
|
02-07-2007, 09:34 AM
|
#3
|
Talking BlackBerry Encyclopedia
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
|
maybe Application.addKeyListener() method and KeyListener interface implementation may help? I didn't tried it myself
|
Offline
|
|
02-07-2007, 12:44 PM
|
#4
|
Thumbs Must Hurt
Join Date: Feb 2007
Location: CO
Model: 8700g
Posts: 188
|
model
Quote:
Originally Posted by dthunt
Hi,
I was wondering if it is possible to determine if the ALT key is pressed if my screen isnt in the foreground. An example of when this is useful is when the phone application comes up - it turns on the ALT status automatically. My application wants to know when this happens, even if my screen is not in the foreground.
Does anyone know if this is possible?
Thanks,
Dallan
|
What's your model? Because even with mine it always shows in the upper right hand corner. Symbols will very depending on model, platform and theme.
__________________
Crackberry, the legal drug.
T-Mobile
8700g
|
Offline
|
|
02-07-2007, 12:53 PM
|
#5
|
Thumbs Must Hurt
Join Date: Feb 2007
Location: CO
Model: 8700g
Posts: 188
|
?!..
What my concern is what is wrong with the editor to ask that. Normally I run a visual basic editor 6.0. Though I have not written BB software for it, the program will not ask unless your in a wizard.Now if the phone app is intilizied and the alt key is automatic, then the alt key should set a value of 2. If not then 1.In any case reset the value to zero shown hereThat should fall under the startboot or autorun file.Let me know if this helps.
__________________
Crackberry, the legal drug.
T-Mobile
8700g
|
Offline
|
|
02-07-2007, 01:16 PM
|
#6
|
Knows Where the Search Button Is
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
|
It may indicate that ALT has been pressed on the top of the screen, but I want to determine it programatically so I can bring up a PopupScreen or something.
The following works in keyStatus -
Keypad.status(keycode) == KeypadListener.STATUS_ALT
this returns true when the ALT is pressed, but keyStatus() seems only to get called when my screen is in the foreground. There must be a way to determine if the ALT is down at anytime, even if it is just to be able to check it.
Dallan
|
Offline
|
|
02-07-2007, 01:27 PM
|
#7
|
CrackBerry Addict
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
|
of course you can get the status of any key but you were asking about getting a key press from another application while your app is in the background? is this correct? - in this scenario i'm not sure it's possible.
(i have no idea what the two posters above are on about)
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
|
Offline
|
|
02-07-2007, 01:30 PM
|
#8
|
Thumbs Must Hurt
Join Date: Feb 2007
Location: CO
Model: 8700g
Posts: 188
|
solution
I think that you need an additional code for the ALT symbol to apper on the screen. Either on your PC or your BB.
__________________
Crackberry, the legal drug.
T-Mobile
8700g
|
Offline
|
|
02-07-2007, 01:39 PM
|
#9
|
Thumbs Must Hurt
Join Date: Feb 2007
Location: CO
Model: 8700g
Posts: 188
|
I think I know what's wrong, try on the BlackBerry pressing and hold alt and push the escape button. It's the = of control tab.And try a different method.The GetKey command or KedID command line in Basic will tell you, but remodify the line to have the program tell you what to do when certain buttons and combos are keyed.Hope it helps.
__________________
Crackberry, the legal drug.
T-Mobile
8700g
|
Offline
|
|
02-07-2007, 01:45 PM
|
#10
|
Thumbs Must Hurt
Join Date: Feb 2007
Location: CO
Model: 8700g
Posts: 188
|
refresher
Quote:
Originally Posted by jfisher
of course you can get the status of any key but you were asking about getting a key press from another application while your app is in the background? is this correct? - in this scenario i'm not sure it's possible.
(i have no idea what the two posters above are on about)
|
What dillan wants is to check the status of pressing the alt key. But mainly from an editor program. Some advise would be helpful. (I'm running out of ideas!)
__________________
Crackberry, the legal drug.
T-Mobile
8700g
|
Offline
|
|
02-07-2007, 01:50 PM
|
#11
|
Knows Where the Search Button Is
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
|
I don't even necessarily want my background app to be notified when the ALT is pressed, it would suffice to be able to find when I want if the ALT is pressed.
In response to the last post, Im familiar with the ALT+ESC for BB, but what is the KeyKey or KedID. I didn't quite understand what you're getting at.
Dallan
|
Offline
|
|
02-07-2007, 01:52 PM
|
#12
|
Knows Where the Search Button Is
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
|
One more thing, the ALT status stays on the device after the ALT button is pressed until the next key is pressed, I believe - which is why I really only want to check if the device has entered the status of the ALT key.
|
Offline
|
|
02-07-2007, 02:00 PM
|
#13
|
Thumbs Must Hurt
Join Date: Feb 2007
Location: CO
Model: 8700g
Posts: 188
|
clairification
Here is what I was trying to get at, the getKey function gets the keyed number that iditifies where it is on the keyboard. To show it in the fore ground, an extra command line will need to be added. Then, with the key numer, instert it in into the line used for showing it on the foreground what ever it maybe.Does that help?
__________________
Crackberry, the legal drug.
T-Mobile
8700g
|
Offline
|
|
02-07-2007, 02:11 PM
|
#14
|
Knows Where the Search Button Is
Join Date: Jan 2007
Model: 8100
Carrier: Rogers
Posts: 22
|
I would have to try it out I guess, but I don't think it allows me to detect when the keyboard is in the ALT status.
|
Offline
|
|
02-07-2007, 04:02 PM
|
#15
|
Thumbs Must Hurt
Join Date: Feb 2007
Location: CO
Model: 8700g
Posts: 188
|
if the keyboard
The keyboard is supposed to stay in alt mode until the next key is pressed or the alt keyed is pressed again.
Unless you programmed the function as a keyboard for computer function through the alt key. (By holding it down to get the desired effect)
__________________
Crackberry, the legal drug.
T-Mobile
8700g
|
Offline
|
|
02-07-2007, 05:21 PM
|
#16
|
CrackBerry Addict
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
|
ok, i'm jumping ship - this thread has turned surreal.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
|
Offline
|
|
02-07-2007, 05:25 PM
|
#17
|
BBF Moderator
Join Date: Jun 2005
Model: Z30
OS: 10.2.1.x
PIN: s & needles
Carrier: AT&T
Posts: 34,720
|
Yes it has...
|
Offline
|
|
|
|