Compare commits
No commits in common. "99a57adff7a6706dc06cfd8b0496bc2dd0e99bf9" and "f6bd6476e9806a3c8f674296a52d9ef79959d2fa" have entirely different histories.
99a57adff7
...
f6bd6476e9
1 changed files with 2 additions and 12 deletions
|
|
@ -320,16 +320,12 @@ document.addEventListener("keydown", (e) => {
|
|||
}
|
||||
const list = side != 1 ? focusListMain : focusListSecond
|
||||
const currentFocus = list.indexOf(focused)
|
||||
switch(e.code) {
|
||||
switch(e.key) {
|
||||
case "Escape":
|
||||
tui.home()
|
||||
break
|
||||
case "ArrowRight":
|
||||
case "ArrowDown":
|
||||
case "KeyL":
|
||||
case "KeyJ":
|
||||
case "KeyD":
|
||||
case "KeyS":
|
||||
if (list.length > 0) {
|
||||
if (currentFocus < list.length - 1) { e.preventDefault() }
|
||||
if (side < 1 && currentFocus == -1) {
|
||||
|
|
@ -342,10 +338,6 @@ document.addEventListener("keydown", (e) => {
|
|||
break
|
||||
case "ArrowLeft":
|
||||
case "ArrowUp":
|
||||
case "KeyH":
|
||||
case "KeyK":
|
||||
case "KeyA":
|
||||
case "KeyW":
|
||||
if (list.length > 0) {
|
||||
if (currentFocus > 0) { e.preventDefault() }
|
||||
if (side < 1 && currentFocus == -1) {
|
||||
|
|
@ -357,8 +349,7 @@ document.addEventListener("keydown", (e) => {
|
|||
}
|
||||
break
|
||||
case "Enter":
|
||||
case "Space":
|
||||
case "KeyE":
|
||||
case " ":
|
||||
const skipDiv = document.getElementsByClassName("skip-animation")[0]
|
||||
if (skipDiv) {
|
||||
if (window.getComputedStyle(skipDiv).visibility != "hidden") {skipAnimation()}
|
||||
|
|
@ -368,7 +359,6 @@ document.addEventListener("keydown", (e) => {
|
|||
focused.click()
|
||||
break
|
||||
case "Tab":
|
||||
case "KeyQ":
|
||||
e.preventDefault()
|
||||
if (side >= 0) {side = (side + 1) % 2}
|
||||
if (side == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue