Skip to content

Commit

Permalink
Switch to reveal 3.7.0 key binding API
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed May 10, 2020
1 parent 68644ec commit 233ce1b
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions pdfexport.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,11 @@ var PdfExport = ( function( Reveal ){
function installKeyBindings(){
var config = Reveal.getConfig();
var shortcut = config.pdfExportShortcut || 'E';
if( !config.keyboard ){
return;
}
var keyboard = config.keyboard === true ? {} : config.keyboard;
keyboard[ shortcut.toUpperCase().charCodeAt( 0 ) ] = togglePdfExport;

Reveal.registerKeyboardShortcut( shortcut, 'PDF export mode' );
Reveal.configure({
keyboard: keyboard
});
Reveal.addKeyBinding({
keyCode: shortcut.toUpperCase().charCodeAt( 0 ),
key: shortcut,
description: 'PDF export mode'
}, togglePdfExport );
}

function install(){
Expand Down

0 comments on commit 233ce1b

Please sign in to comment.