aboutsummaryrefslogtreecommitdiff
path: root/plugin/notes
diff options
context:
space:
mode:
authorGreg Denehy <greg@inclose.com.au>2017-04-30 15:23:04 +0930
committerGreg Denehy <greg@inclose.com.au>2017-04-30 15:23:04 +0930
commit7297474b2e683f6e6e382891b2ec36e7f22c0764 (patch)
tree081999922163bf9be84c09362a4aee1f886652ff /plugin/notes
parent91c6db71ca4de1878f1132f135a46d729e1b6960 (diff)
downloadperl-software-in-gnu-guix-7297474b2e683f6e6e382891b2ec36e7f22c0764.tar
perl-software-in-gnu-guix-7297474b2e683f6e6e382891b2ec36e7f22c0764.tar.gz
Added programatic support for custom key bindings with optional descriptions to be added to the help screen
Diffstat (limited to 'plugin/notes')
-rw-r--r--plugin/notes/notes.js14
1 files changed, 1 insertions, 13 deletions
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js
index 202e73b..8980fb4 100644
--- a/plugin/notes/notes.js
+++ b/plugin/notes/notes.js
@@ -106,19 +106,7 @@ var RevealNotes = (function() {
}
// Open the notes when the 's' key is hit
- document.addEventListener( 'keydown', function( event ) {
- // Disregard the event if the target is editable or a
- // modifier is present
- if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
-
- // Disregard the event if keyboard is disabled
- if ( Reveal.getConfig().keyboard === false ) return;
-
- if( event.keyCode === 83 ) {
- event.preventDefault();
- openNotes();
- }
- }, false );
+ Reveal.addKeyBinding({code: 83, key: 'S', description: 'Speaker notes'}, openNotes);
}