on-escape

2.0.0 • Public • Published

on-escape

Dependency Status

Attach an escape key handler.

Rewrite of segmentio/on-escape for npm+browserify support.

Installation

$ npm install on-escape

API

var onEscape = require('on-escape');

onEscape(fn)

Binds a handler fn(event) to be called when the ESC key is pressed.

Alias: onEscape.bind(fn)

onEscape.unbind(fn)

Unbinds a handler fn.

Package Sidebar

Install

npm i on-escape

Weekly Downloads

3

Version

2.0.0

License

MIT

Last publish

Collaborators

  • kenan