From 4b57674dcb87e894be5371bb5514edc08aec212d Mon Sep 17 00:00:00 2001 From: Erayd Date: Thu, 26 Jul 2018 00:37:05 +1200 Subject: [PATCH] Allow using left / right arrows to select buttons (#279) --- chrome/script.browserify.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/chrome/script.browserify.js b/chrome/script.browserify.js index 2e394c3..c45726a 100644 --- a/chrome/script.browserify.js +++ b/chrome/script.browserify.js @@ -359,6 +359,16 @@ function keyHandler(e) { case "ArrowDown": switchFocus("div.entry:first-child > .login", "nextElementSibling"); break; + case "ArrowRight": + if (document.activeElement.nextElementSibling) { + document.activeElement.nextElementSibling.focus(); + } + break; + case "ArrowLeft": + if (document.activeElement.previousElementSibling) { + document.activeElement.previousElementSibling.focus(); + } + break; case "c": if (e.target.id != "search-field" && e.ctrlKey) { document.activeElement.parentNode