Compare commits

..

No commits in common. "99a57adff7a6706dc06cfd8b0496bc2dd0e99bf9" and "f6bd6476e9806a3c8f674296a52d9ef79959d2fa" have entirely different histories.

View file

@ -320,16 +320,12 @@ document.addEventListener("keydown", (e) => {
} }
const list = side != 1 ? focusListMain : focusListSecond const list = side != 1 ? focusListMain : focusListSecond
const currentFocus = list.indexOf(focused) const currentFocus = list.indexOf(focused)
switch(e.code) { switch(e.key) {
case "Escape": case "Escape":
tui.home() tui.home()
break break
case "ArrowRight": case "ArrowRight":
case "ArrowDown": case "ArrowDown":
case "KeyL":
case "KeyJ":
case "KeyD":
case "KeyS":
if (list.length > 0) { if (list.length > 0) {
if (currentFocus < list.length - 1) { e.preventDefault() } if (currentFocus < list.length - 1) { e.preventDefault() }
if (side < 1 && currentFocus == -1) { if (side < 1 && currentFocus == -1) {
@ -342,10 +338,6 @@ document.addEventListener("keydown", (e) => {
break break
case "ArrowLeft": case "ArrowLeft":
case "ArrowUp": case "ArrowUp":
case "KeyH":
case "KeyK":
case "KeyA":
case "KeyW":
if (list.length > 0) { if (list.length > 0) {
if (currentFocus > 0) { e.preventDefault() } if (currentFocus > 0) { e.preventDefault() }
if (side < 1 && currentFocus == -1) { if (side < 1 && currentFocus == -1) {
@ -357,8 +349,7 @@ document.addEventListener("keydown", (e) => {
} }
break break
case "Enter": case "Enter":
case "Space": case " ":
case "KeyE":
const skipDiv = document.getElementsByClassName("skip-animation")[0] const skipDiv = document.getElementsByClassName("skip-animation")[0]
if (skipDiv) { if (skipDiv) {
if (window.getComputedStyle(skipDiv).visibility != "hidden") {skipAnimation()} if (window.getComputedStyle(skipDiv).visibility != "hidden") {skipAnimation()}
@ -368,7 +359,6 @@ document.addEventListener("keydown", (e) => {
focused.click() focused.click()
break break
case "Tab": case "Tab":
case "KeyQ":
e.preventDefault() e.preventDefault()
if (side >= 0) {side = (side + 1) % 2} if (side >= 0) {side = (side + 1) % 2}
if (side == 0) { if (side == 0) {