diff options
Diffstat (limited to 'node_modules/mousetrap/plugins/record/README.md')
-rw-r--r-- | node_modules/mousetrap/plugins/record/README.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/mousetrap/plugins/record/README.md b/node_modules/mousetrap/plugins/record/README.md new file mode 100644 index 0000000000..903f6057ff --- /dev/null +++ b/node_modules/mousetrap/plugins/record/README.md @@ -0,0 +1,16 @@ +# Record + +This extension lets you use Mousetrap to record keyboard sequences and play them back: + +```html +<button onclick="recordSequence()">Record</button> + +<script> + function recordSequence() { + Mousetrap.record(function(sequence) { + // sequence is an array like ['ctrl+k', 'c'] + alert('You pressed: ' + sequence.join(' ')); + }); + } +</script> +``` |