Add some keyboard shortcuts.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 5 Sep 2014 05:11:38 +0000 (07:11 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 5 Sep 2014 05:11:38 +0000 (07:11 +0200)
www/js/remoteglot.js

index 565b61d..47bd62f 100644 (file)
@@ -711,6 +711,13 @@ var init = function() {
                update_highlight();
                redraw_arrows();
        });
+       $(window).keyup(function(event) {
+               if (event.which == 39) {
+                       next_move();
+               } else if (event.which == 37) {
+                       prev_move();
+               }
+       });
 };
 $(document).ready(init);