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 };