include speaker view keyboard shortcut when applicable #1466

This commit is contained in:
Hakim El Hattab 2016-01-08 13:49:06 +01:00
parent 4ee6769e0f
commit 06cdd9b7cd
2 changed files with 8 additions and 0 deletions

View File

@ -4684,6 +4684,11 @@
// Programatically triggers a keyboard event // Programatically triggers a keyboard event
triggerKey: function( keyCode ) { triggerKey: function( keyCode ) {
onDocumentKeyDown( { keyCode: keyCode } ); onDocumentKeyDown( { keyCode: keyCode } );
},
// Registers a new shortcut to include in the help overlay
registerKeyboardShortcut: function( key, value ) {
keyboardShortcuts[key] = value;
} }
}; };

View File

@ -120,6 +120,9 @@ var RevealNotes = (function() {
} }
}, false ); }, false );
// Show our keyboard shortcut in the reveal.js help overlay
if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' );
} }
return { open: openNotes }; return { open: openNotes };