BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 08-29-2007, 09:11 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation what am i doing wrong ??

Please Login to Remove!

When i run my application and press any keys nothing happens.I want to capture the key events.what am i doing wrong.

[code]
public class Panic_Entry extends MainScreen implements KeyListener {

public Panic_Entry() {
super();
setTitle("Hello");
Application.getApplication().addKeyListener(this);
//super.addKeyListener();
}
public boolean keyChar(char key, int status, int time) {
boolean retval = false;
switch(key) {
case Characters.ESCAPE:
Dialog.alert("Escape");
break;
case Characters.DELETE:
Dialog.alert("Delete");
break;
default:
retval = super.keyChar(key,status,time);
}
return retval;
}
public boolean keyStatus(int keycode, int time) {return true; }
public boolean keyRepeat(int keycode, int time) {return true; }
public boolean keyUp(int keycode, int time) {return true; }
public boolean keyDown(int keycode, int time) {return true; }
}
[\Code]
__________________
Thanks
Meenal
Offline  
Old 08-29-2007, 10:23 AM   #2 (permalink)
BBF Moderator
 
John Clark's Avatar
 
Join Date: Jun 2005
Model: Z30
OS: 10.2.1.x
PIN: s & needles
Carrier: AT&T
Posts: 34,715
Post Thanks: 6
Thanked 115 Times in 82 Posts
Default

Duplicate post.

what am i doing wrong ??

Thread closed
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

NEW Carlisle 071029 7 Hinged Tortilla Server Terracotta Pack of 12
$134.04
NEW Carlisle 071029 7 Hinged Tortilla Server Terracotta Pack of 12 pictureBLACK Pink Animal Zebra Print 3 POCKET WAITRESS WAIST BAR SERVERS Resturant
$11.89
BLACK Pink Animal Zebra Print 3 POCKET WAITRESS WAIST BAR SERVERS  Resturant pictureDogs lounging waitress server waiter waist apron 3 pockets
$11.0
Dogs lounging waitress server waiter waist apron 3 pockets pictureBlack reversible Emoji icons waitress server waiter waist apron 3 pocket
$11.0
Black reversible Emoji icons waitress server waiter waist apron 3 pocket picture Black apron Skulls fiesta white waitress server waiter waist apron 3 pockets
$11.0
 Black apron Skulls fiesta white waitress server waiter waist apron 3 pockets picture






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