Socket
Socket
Sign inDemoInstall

mousetrap-record

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mousetrap-record

This extension allows you to record a keyboard sequence using Mousetrap.


Version published
Weekly downloads
45
increased by4.65%
Maintainers
1
Install size
18.0 kB
Created
Weekly downloads
 

Readme

Source

Record

This extension lets you use Mousetrap to record keyboard sequences and play them back.

This is a node module (works in node/electron or with something like browserify). For original plugin see this repo

Installation

npm install mousetrap-record --save

Note that you also need the core mousetrap module (npm install mousetrap --save).

Usage

var Mousetrap = require('mousetrap-record')(require('mousetrap'));
<button onclick="recordSequence()">Record</button>

<script>
    function recordSequence() {
        Mousetrap.record(function(sequence) {
            // sequence is an array like ['ctrl+k', 'c']
            console.log('You pressed: ' + sequence.join(' '));
        });
    }
</script>

Keywords

FAQs

Last updated on 06 Oct 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc