feat: Arrow keys to move back in the current line

This commit is contained in:
2026-06-10 13:46:38 +05:30
parent 06a7f6ea9a
commit 255cadceec

View File

@@ -669,6 +669,7 @@
}
selected = null;
highlights = [];
playSound('undo');
}
function resetBoard(showSelection = true) {
@@ -1354,8 +1355,21 @@
}
moveTags[currentRep] = { ...moveTags[currentRep] };
}
function handleKeyDown(e) {
if (e.key === 'ArrowLeft') {
const target = e.target;
if (target && (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable)) {
return;
}
e.preventDefault();
goBack();
}
}
</script>
<svelte:window onkeydown={handleKeyDown} />
<svelte:head>
<title>Chess Opening Repertoire Builder</title>
</svelte:head>