BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-29-2008, 06:18 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2008
Model: 8820
PIN: N/A
Carrier: Airtel
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Escape Button

Please Login to Remove!

Hi,

Is there any way by which I can disable the back(Escape key) button.

To be more precise, I have a screen that is currently being displayed, and after the screen is displayed, I dont want the Escape key to take me to the previuos screen.

And also I dont want to push the current screen again and again as and when the escape Button is pressed.



Regards,
Flavian
Offline  
Old 07-29-2008, 06:20 AM   #2 (permalink)
Thumbs Must Hurt
 
amusic's Avatar
 
Join Date: Jul 2008
Model: 9700
Carrier: www.bb.3mtb.com
Posts: 53
Post Thanks: 0
Thanked 1 Time in 1 Post
Default

I don't thing that is possible.
Escape key is built into the OS, so that would require some major hacking.
Offline  
Old 07-29-2008, 08:29 AM   #3 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Override the onClose() method for your screen. and return false (instead of true).

Having said that, I'm not sure this is a great idea, since users are 'trained' to use the ESC key.
Offline  
Old 07-29-2008, 08:41 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

within your class extending Screen

Code:
public boolean keyCharUnhandled(char key, int status, int time) {

	

			switch (key) {
			case Characters.ESCAPE:
				return true;
				break;
}
}
Offline  
Old 07-30-2008, 11:58 PM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2008
Model: 8820
PIN: N/A
Carrier: Airtel
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi..
Thanks. It works fine.

Regards,
Flavian
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.