diff options
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js index 5cbb3ff..bdd4a15 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2658,8 +2658,13 @@ var Reveal = (function(){ // keyboard modifier key is present if( hasFocus || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return; - // While paused only allow "unpausing" keyboard events (b and .) - if( isPaused() && [66,190,191].indexOf( event.keyCode ) === -1 ) { + // While paused only allow "unpausing" keyboard events ('b', '.' or any key specifically mapped to togglePause ) + var allowedKeys = [66,190,191].concat(Object.keys(config.keyboard).map(function(key){ + if (config.keyboard[key] === 'togglePause') { + return parseInt(key, 10); + } + })); + if( isPaused() && allowedKeys.indexOf( event.keyCode ) === -1 ) { return false; } |