mousetrap-pause

Adds methods to pause and to unpause all combos or specific combos to Mousetrap

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
mousetrap-pause
101.0.09 years ago9 years agoMinified + gzip package size for mousetrap-pause in KB

Readme

mousetrap-pause
Mousetrap plugin to pause and unpause all or specific combos

Installation

npm install mousetrap-pause --save

Usage

Use browserify to use Mousetrap with pausing functionality:
var mousetrap = require('mousetrap-pause')(require('mousetrap'));

API

This plugin extends Mousetrap to pause:
mousetrap.pause();

and to unpause
mousetrap.unpause();

If you want to pause or unpause only single combos, e.g. mod-a:
mousetrap.pauseCombo('mod-a');

/* ... */

mousetrap.unpauseCombo('mod-a');