sign in

 



Forgot your password?

signup

Why sign up?
- One account for five websites!
- Free access to Premium Codes
- Acess to cool web tools
- Ask and answer questions
- Stay ahead of other web developers
- and MUCH MORE!




You can also sign up by your facebook account!
Feel The Power

Html Codes: Canvas- Working with Keyboard and Detect Pressed Key

You may want to create a graphical Canvas which needs that ask something from the users or a key to get pressed. HTML allows you to detect the pressed key by Javascript. Then you can manage the pressed key and make a relationship between it and HTML5 Canvas and define different actions for it. For example it is also possible to move an object by a keyboard key. The following example asks for the user's name and wrote it on the Canvas Context. Note that to avoid complexity we don't have defined special keys such as Shift or Backspace and it is just a simple writing program.
(To make the preview below work, click on the preview frame)



If you don't know how to use this code or need more information Click here!



 

You can leave comments once you sign in/up.




f

Review

Please Rate this!
VISITORS
Online Users: 33
Total Online Users: 43
Recent Members: Eric Wan, JAYA, derickkk, HEX_Andersson, n_jafari8919
FIND US

LINK US

Link to us:

Please put this code in your page.