Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

electron-is-accelerator

0.2.0 • Public • Published

electron-is-accelerator

Check if a string is a valid Electron accelerator and return a boolean. This module can be used to validate user defined accelerators before using them with MenuItems.

Installation

$ npm install --save electron-is-accelerator

Usage

var isAccelerator = require("electron-is-accelerator");
 
isAccelerator("CommandOrControl+Shift+Z"); // true
isAccelerator("CommandOrControl+F9"); // true
isAccelerator("CommandOrContrl+F9"); // false
isAccelerator("A+Z"); // false

License

The MIT License (MIT) Copyright (c) 2016 Thomas Brouard

Install

npm i electron-is-accelerator

DownloadsWeekly Downloads

28,364

Version

0.2.0

License

MIT

Unpacked Size

6.27 kB

Total Files

9

Last publish

Collaborators

  • avatar