diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2015-06-03 11:59:00 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2015-06-03 11:59:00 +0200 |
commit | db359519aed9a949944c9543a0b6f5c0745c3e85 (patch) | |
tree | 1d03448a3e87d4bcf7c61aa6c1a93b6f5a645456 | |
parent | f0cf1f54d04088d241acf81eef42bd878a9f02ba (diff) | |
parent | a078c87f106955d4cbc94e5857360f5d9907fc27 (diff) | |
download | perl-software-in-gnu-guix-db359519aed9a949944c9543a0b6f5c0745c3e85.tar perl-software-in-gnu-guix-db359519aed9a949944c9543a0b6f5c0745c3e85.tar.gz |
merge #959 with minor tweaks
-rw-r--r-- | js/reveal.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js index ff5ea53..556f222 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3764,8 +3764,15 @@ // keyboard modifier key is present if( activeElementIsCE || activeElementIsInput || (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 resume keyboard events; + // 'b', '.' or any key specifically mapped to togglePause + var resumeKeyCodes = [66,190,191].concat( Object.keys( config.keyboard ).map( function( key ) { + if( config.keyboard[key] === 'togglePause' ) { + return parseInt( key, 10 ); + } + })); + + if( isPaused() && resumeKeyCodes.indexOf( event.keyCode ) === -1 ) { return false; } |