| Reply | « Previous Thread | Next Thread » |
|
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!! |
|
and, I think using a commandlistener in standard j2me GUI is much more suitable.
unless you draw in canvas, then you should use keypress.... |
|
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!! |
|
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... . |
|
I will try it then.
|
|
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?
|
| SevenOfEleven |
| View Public Profile |
| Find all posts by SevenOfEleven |
|
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 | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|