1.5.2 • Published 5 years ago

custom-keyboard-code v1.5.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Custom keyboard code

Simple package that allow you to insert a custom keyboard combination with an action. Just like konami code!

Installing

Use npm to install the package with

npm i custom-keyboard-code

Getting Started

Once you install the package you need to create the keyboard combination separate with coma, then we initialize with a cb.

const key = require('custom-keyboard-code');  

var key-combination = key.createKeysCombination('a b c');
key.init(key-combination, function(){
	alert('success!');
});

List of valid characters

  • a - z
  • 0 - 9
  • arrow-up
  • arrow-down
  • arrow-left
  • arrow-right
  • numpad-0 - numpad-9
  • f1 - f24
  • break
  • backspace
  • tab
  • clear
  • enter
  • shift
  • ctrl
  • alt
  • escape
  • space
  • page-up
  • page-down
  • end
  • home
  • select
  • print
  • execute
  • insert
  • delete
  • help
  • command-left, command-right
  • windows-key
  • windows-menu
  • sleep
  • add
  • multiply
  • subtract
  • divide
  • num-lock
  • scroll-lock
  • page-backward, page-forward
  • refresh
  • altgr
  • Especial characters: + * / ? ç ' ` \ = ,