aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2016-01-08 13:49:06 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2016-01-08 13:49:06 +0100
commit06cdd9b7cd62ffde1f8ebcc91b66ae45944718c7 (patch)
treecc279aab1a8d21011a5cfc4e92684c2dde1b4453
parent4ee6769e0f3a80e8609f5586163d5fb5d4e65eb9 (diff)
downloadfosdem-2018-presentation-06cdd9b7cd62ffde1f8ebcc91b66ae45944718c7.tar
fosdem-2018-presentation-06cdd9b7cd62ffde1f8ebcc91b66ae45944718c7.tar.gz
include speaker view keyboard shortcut when applicable #1466
-rw-r--r--js/reveal.js5
-rw-r--r--plugin/notes/notes.js3
2 files changed, 8 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 9302f82..c576c8c 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -4684,6 +4684,11 @@
// Programatically triggers a keyboard event
triggerKey: function( keyCode ) {
onDocumentKeyDown( { keyCode: keyCode } );
+ },
+
+ // Registers a new shortcut to include in the help overlay
+ registerKeyboardShortcut: function( key, value ) {
+ keyboardShortcuts[key] = value;
}
};
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js
index 202e73b..deb4891 100644
--- a/plugin/notes/notes.js
+++ b/plugin/notes/notes.js
@@ -120,6 +120,9 @@ var RevealNotes = (function() {
}
}, false );
+ // Show our keyboard shortcut in the reveal.js help overlay
+ if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' );
+
}
return { open: openNotes };