You Are Here:

Community: Developer Discussion Boards

#1 Old Keys value - 2003-07-28, 13:58

Join Date: Apr 2003
Posts: 184
zivgr
Offline
Regular Contributor
How can I figure out the values for each key on the phone?
In the documentation of the Canvas class it is written, for example, that UP gets the value 1 and DOWN the value 6.
However, in Nokia's emulators they get different values when I catch them using my implementation of keyPressed().
Reply With Quote

#2 Old 2003-07-28, 14:27

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
zivgr
You probably confused something.
There is now KEY CODE for UP or DOWN.

There are key codes and actions mapped to each other in a phone-dependent way.

I use mainly actions both for Series60 and Series40 and experienced no problem using Canvas constants
Reply With Quote

#3 Old 2003-07-28, 14:31

Join Date: Apr 2003
Posts: 184
zivgr
Offline
Regular Contributor
Probably I do...
So please tell me,
what are the constants UP, DOWN and etc. in the Canvas class related to?
hat do you mean by key codes and actions ?
Reply With Quote

#4 Old 2003-07-28, 14:53

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
zivgr
what are the constants UP, DOWN and etc. in the Canvas class related to?
As you noticed on different phones different keys should be considered as UP, DOWN, etc. E.g. 3650 keyboard is completely different from 7650

That's why it's recommended to use not direct keyCodes, but their "meaning" on the phone used.

You can use Canvas.getGameAction(keyCode) to get "meaning" of the key pressed.

There are some good example documents about it. I think this topic was nicely covered in Game Developer's Guide for Series40 (probably not exact document name).

You can look at documents or wait till some Nokia Expert posts link here :)
It's their job, isn't it? ;)
Reply With Quote

#5 Old 2003-07-28, 15:41

Join Date: Apr 2003
Posts: 184
zivgr
Offline
Regular Contributor
Many thanks for your detailed reply
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 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ