/    Sign up×
Community /Pin to ProfileBookmark

Read Keyboard Keys…

Hi everybody…

I need a script to read keyborard input from the user… I have a map component and I want to use the pad arrows to move through the map, how i can get the input?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@sommardahlJun 05.2009 — Your first task is to find out the unicode for each key you want to trap for. Then you need to set up events to fire onkeypress (or something like that) and test if the unicode keys you chose are being pressed.

This ought to help out: http://www.javascriptkit.com/javatutors/javascriptkey2.shtml
Copy linkTweet thisAlerts:
@veljeanauthorJun 05.2009 — thank you I will check it out...
×

Success!

Help @veljean spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...