This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Movement event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Movement event" Watch "Movement event" New topic
Author

Movement event

saad sal
Greenhorn

Joined: Jul 31, 2005
Posts: 25
I want to find out which events are thrown when the keypad keys are pressed on a mobile phone. I want to use the up,down,left,right keys for movement. However I am not using a Canvas class and am not showing these events on the mobile phone. Basically I am using these movement keys to a server(Computer) and am using them to control the mouse on the Computer.

Basically, in short, what i want to know is the events OR ascii code that is thrown when a particular key is pressed on the mobile phone.
Theodore Casser
Ranch Hand

Joined: Mar 14, 2001
Posts: 1902

I'm... actually not certain that you can get the key events from the midlet if you're not subclassing Canvas/GameCanvas. The high level events (through Displayable's items) are really more general, geared towards a more generalized interface that may not have a physical keyboard, like a PDA with a touch-screen.


Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
saad sal
Greenhorn

Joined: Jul 31, 2005
Posts: 25
Ok thanks. I guess theres no other way then.....have used the Canvas class to move the mouse on PC screen through a Nokia 6630 .

But now I have another problem. I have to get the initial starting position of the mouse from the PC. I am trying to use


But this limits the mouse within a frame whereas I want this to work on anywhere on the PC screen and set the initial value of x and y.

Could anyone help me with this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Movement event