add support for PAGE_UP/DOWN keys for presentation remotes, and add some more keys...
authorRobert Kaiser <kairo@kairo.at>
Tue, 15 Aug 2017 15:01:09 +0000 (17:01 +0200)
committerRobert Kaiser <kairo@kairo.at>
Tue, 15 Aug 2017 15:01:09 +0000 (17:01 +0200)
fosdem2017/slides.js

index 2807799f5bf4290fa5830575f490fa8afc871707..58300e30ae0b1f863406ddce333ae2b62ca55d2b 100644 (file)
@@ -189,10 +189,19 @@ setTimeout("timerFired()", timerMSec);
   function handleKeyPress(e) {
     e = e || event;
     switch (e.keyCode) {
+      // See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode#Constants_for_keyCode_value
       case e.DOM_VK_LEFT:
+      case e.DOM_VK_DOWN:
+      case e.DOM_VK_PAGE_DOWN:
         go("prev"); break;
       case e.DOM_VK_RIGHT:
+      case e.DOM_VK_UP:
+      case e.DOM_VK_PAGE_UP:
         go("next"); break;
+      case e.DOM_VK_HOME:
+        go("start"); break;
+      case e.DOM_VK_END:
+        go("toc"); break;
     }
   }