Skip to content

Commit

Permalink
Fixed readme
Browse files Browse the repository at this point in the history
  • Loading branch information
qiao committed Nov 26, 2012
1 parent 51e5a04 commit d672658
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.markdown
Expand Up @@ -74,11 +74,11 @@ if(key.shift) alert('shift is pressed, OMGZ!');
At any point in time (even in code other than key shortcut handlers),
you can query the `key` object for the state of any key. This
is very helpful for game development using a game loop. For example,
`key.isDown(77)` is `true` if the M key is currently pressed.
`key.isPressed(77)` is `true` if the M key is currently pressed.

```javascript
if(key.isDown("M")) alert('M key is pressed, can ya believe it!?');
if(key.isDown(77)) alert('M key is pressed, can ya believe it!?');
if(key.isPressed("M")) alert('M key is pressed, can ya believe it!?');
if(key.isPressed(77)) alert('M key is pressed, can ya believe it!?');
```

You can also get these as an array using...
Expand Down

0 comments on commit d672658

Please sign in to comment.