• Post Reply Bookmark Topic Watch Topic
  • New Topic

Key Codes For Different mobile model  RSS feed

 
Ranch Hand
Posts: 162
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers


I am currently developing J2ME application based on Canvas.
I am using keyPressed method and from keyCode am I doing some changes on UI.

My problem is that for UP, DOWN, LEFT , RIGHT button I am checking key code to -1,-2,-3,-4 . It works for fine on nokia handset but refuse to work on Motorola.

is there any solution so that I can generalized my application so that it will work for
all(most of the ) handset ?

Also any link to get key code for different mobile manufacturer ?
 
Saloon Keeper
Posts: 18800
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're just planning to use the standard number keys, you should be reading the translated characters, not the raw keycodes. It's less work to code and more portable.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!