sign in


Forgot your password?


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!

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.


Online Users: 3
Total Online Users: 15
Recent Members: DonaldBreat, rostam465, JosephAwani, Carloslaf, Roberttikal
Twitter LinkedIn Youtube

Download Link to us:


Please put this code in your page.