Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fabslab committed Nov 29, 2013
1 parent 8e1ee32 commit c70641c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@ This is a small subset of the functionality in that library. See for yourself ho

At any point in time you can query the `modifiers` object to see if a modifier key is held down.

Supported keys are:
Default supported keys are:
`shift`, `alt`, `option` (same as `alt`), `control`, `command`

```javascript
if (modifiers.command || modifiers.control) {
// do something special
}

// ..inside your click handler
if (modifiers.shift) {
...
}
```

You can also add your own to the defaults:
```javascript
modifiers.add({{
Expand All @@ -22,17 +33,6 @@ modifiers.add({{
});
```
```javascript
if (modifiers.command || modifiers.control) {
// do something special
}

// ..inside your click handler
if (modifiers.shift) {
...
}
```
### Building
To create the minified and compressed version with source mapping, run:
Expand Down

0 comments on commit c70641c

Please sign in to comment.