From: Steinar H. Gunderson Date: Fri, 5 Sep 2014 05:11:38 +0000 (+0200) Subject: Add some keyboard shortcuts. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=998ea0709033e84e16cdcec97850604128e15e0c Add some keyboard shortcuts. --- diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 565b61d..47bd62f 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -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);