Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Movement event

 
saad sal
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1902
Hibernate Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
saad sal
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic