Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uiur/with-modifier-key

Detect some modifier keys are pressed
https://github.com/uiur/with-modifier-key

Last synced: about 1 month ago
JSON representation

Detect some modifier keys are pressed

Awesome Lists containing this project

README

        

# with-modifier-key
[![Build Status](https://travis-ci.org/uiureo/with-modifier-key.svg)](https://travis-ci.org/uiureo/with-modifier-key)

Detect some modifier keys are pressed.

For example, you can use this to detect an user is going to open a link in new tab or window.

``` javascript
var withModifierKey = require('with-modifier-key')

element.addEventListener('click', function (event) {
if (withModifierKey(event)) {
// yay
}
})
```

## Install

```
npm install with-modifier-key
```

## License
MIT