You Are Here:

Community: Developer Discussion Boards

#1 Old Handling key pressed events - 2005-02-04, 17:33

Join Date: Nov 2004
Posts: 33
yuava
Offline
Registered User
I have created a List in my MIDlet, how can i detected if a key is pressed in the List.
I know that event handling for key pressed is available in Canvas, can i used similar method to do this on my List?
Or is there any information can help me?

Thanks a lot!!
Reply With Quote

#2 Old 2005-02-04, 20:31

Join Date: Oct 2004
Posts: 66
Pinga123
Offline
Regular Contributor
and, I think using a commandlistener in standard j2me GUI is much more suitable.
unless you draw in canvas, then you should use keypress....
Reply With Quote

#3 Old 2005-02-06, 08:21

Join Date: Nov 2004
Posts: 33
yuava
Offline
Registered User
I have added the commandListener to my list, but I only know that when the user pressed a command button (e.g. EXIT button), i can write down :
if (c == cmExit) {...}
in the commandAction(Command c, Displayable s) function.

What should I write if i want to detect the user pressed a key(e.g. KEY_NUM6) in the phone?

Thanks!!
Reply With Quote

#4 Old 2005-02-07, 03:09

Join Date: Oct 2004
Posts: 66
Pinga123
Offline
Regular Contributor
if you want the user input something by using key_num_6 in text field or text box, then you dont need to do anything..
but , if you want to have specific funtion for that ...for example in game, key_unm_6 ususally used for going right...then you have to use Canvas...
.
Reply With Quote

#5 Old Thanks a lot!! - 2005-02-07, 17:20

Join Date: Nov 2004
Posts: 33
yuava
Offline
Registered User
I will try it then.
Reply With Quote

#6 Old Re: Handling key pressed events - 2005-12-13, 01:47

Join Date: Dec 2005
Posts: 37
SevenOfEleven
Offline
Registered User
Is it possible to tell if a user pressed the number keys while using the High level UI api or do I have to use the low level ui api?
Reply With Quote

#7 Old Re: Handling key pressed events - 2005-12-20, 18:42

Join Date: Mar 2003
Posts: 101
marycore
Offline
Regular Contributor
Hi all,
I have written an exe program, which is running in background and is listening for Send key(green key) pressing for example.
But I need a program to listen for any key pressing and can detect which key is pressed, and compaire it with a code,
I don't want this just do listening for the send key, I want it can captures any key then detect what was pressed!

I am using this code, how can I chsange it for my porpuse?


...
iWinGroup.CaptureKeyUpAndDowns(127, 0, 0);
iWsSession.EventReady(&iStatus);
SetActive();
...
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia