Allow adding arrows as chord actions when shift is pressed (#179)

This commit is contained in:
Aleksandr Iushmanov
2025-04-06 16:41:14 +01:00
committed by GitHub
parent 1d60b12d43
commit 1c8f53caf6

View File

@@ -18,11 +18,11 @@
}); });
function keypress(event: KeyboardEvent) { function keypress(event: KeyboardEvent) {
if (event.key === "ArrowUp") { if (!event.shiftKey && event.key === "ArrowUp") {
addSpecial(event); addSpecial(event);
} else if (event.key === "ArrowLeft") { } else if (!event.shiftKey && event.key === "ArrowLeft") {
moveCursor(cursorPosition - 1); moveCursor(cursorPosition - 1);
} else if (event.key === "ArrowRight") { } else if (!event.shiftKey && event.key === "ArrowRight") {
moveCursor(cursorPosition + 1); moveCursor(cursorPosition + 1);
} else if (event.key === "Backspace") { } else if (event.key === "Backspace") {
deleteAction(cursorPosition - 1); deleteAction(cursorPosition - 1);