aboutsummaryrefslogtreecommitdiffhomepage
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab2012-05-29 18:41:50 -0400
committerHakim El Hattab2012-05-29 18:41:50 -0400
commiteaca6465fa7c0cef35cf6fd05ce1d0cd9e4f473c (patch)
tree941a0814b53f81f3c552797276ce67bb5e284225 /js/reveal.js
parente7b8033a10e77b3737246fffaa625c4ac4968ca5 (diff)
space and return keys can be used to exit the overview mode
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 76bdcba..729f2f9 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -189,8 +189,8 @@ var Reveal = (function(){
switch( event.keyCode ) {
// p, page up
case 80: case 33: navigatePrev(); triggered = true; break;
- // n, page down, space
- case 78: case 32: case 34: navigateNext(); triggered = true; break;
+ // n, page down
+ case 78: case 34: navigateNext(); triggered = true; break;
// h, left
case 72: case 37: navigateLeft(); triggered = true; break;
// l, right
@@ -203,6 +203,10 @@ var Reveal = (function(){
case 36: navigateTo( 0 ); triggered = true; break;
// end
case 35: navigateTo( Number.MAX_VALUE ); triggered = true; break;
+ // space
+ case 32: overviewIsActive() ? deactivateOverview() : navigateNext(); triggered = true; break;
+ // return
+ case 13: if( overviewIsActive() ) { deactivateOverview(); triggered = true; } break;
}
if( triggered ) {