Disable h/l/left/right changing system if shift, ctrl, or meta keys are pressed (#703)

This commit is contained in:
henrygd
2025-04-23 16:40:58 -04:00
parent 2467bbc0f0
commit c74e7430ef

View File

@@ -320,7 +320,13 @@ export default function SystemDetail({ name }: { name: string }) {
return
}
const handleKeyUp = (e: KeyboardEvent) => {
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) {
if (
e.target instanceof HTMLInputElement ||
e.target instanceof HTMLTextAreaElement ||
e.shiftKey ||
e.ctrlKey ||
e.metaKey
) {
return
}
const currentIndex = systems.findIndex((s) => s.name === name)