aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2015-06-03 11:59:00 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2015-06-03 11:59:00 +0200
commitdb359519aed9a949944c9543a0b6f5c0745c3e85 (patch)
tree1d03448a3e87d4bcf7c61aa6c1a93b6f5a645456 /js
parentf0cf1f54d04088d241acf81eef42bd878a9f02ba (diff)
parenta078c87f106955d4cbc94e5857360f5d9907fc27 (diff)
downloadperl-software-in-gnu-guix-db359519aed9a949944c9543a0b6f5c0745c3e85.tar
perl-software-in-gnu-guix-db359519aed9a949944c9543a0b6f5c0745c3e85.tar.gz
merge #959 with minor tweaks
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js11
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;
}