Name: purescript-dom-keyboard
Owner: SlamData, Inc.
Description: A package which provides ways to capture and manipulate keyboard interactions.
Created: 2015-12-04 16:30:12.0
Updated: 2018-03-09 18:33:46.0
Pushed: 2017-03-20 15:47:11.0
Homepage: null
Size: 118
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A library for binding actions to and presenting DOM keyboard shortcuts.
The shortcuts available are strongly typed to help ensure that your shortcuts are triggered and prevent applications being hidden or closed across various platforms and locales.
If you find an available shortcut hides or closes an application or that a shortcut isn't triggered on some platform or locale please open an issue. Pull requests are very welcome.
r install purescript-dom-keyboard
This library relies on
DOM Level 3 KeyboardEvent.key
and DOM Level 3 KeyboardEvent.code
values. If your target browser does not support these then please consider using
a polyfill such as the one provided by
js-polyfills
.
A simple example is available here.
It can be run by using pulp server
from the example
directory and navigating
to http://localhost:1337
in a web browser.
Module documentation is published on Pursuit: http://pursuit.purescript.org/packages/purescript-dom-keyboard
To add or remove keyboard shortcuts please use the provided program generator.
After altering the key or code shortcut sources use pulp run --include ../src
in the generator
directory to update src/Data/Shortcut.purs
.