mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2025-12-11 13:26:16 +00:00
@@ -26,6 +26,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function keydown(event: KeyboardEvent) {
|
function keydown(event: KeyboardEvent) {
|
||||||
|
// This is obviously a tradeoff
|
||||||
|
if (event.key === "Tab" || event.key === "Escape") return;
|
||||||
if (!editing) return;
|
if (!editing) return;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const input = inputToAction(event, get(serialPort)?.device === "X");
|
const input = inputToAction(event, get(serialPort)?.device === "X");
|
||||||
@@ -85,6 +87,7 @@
|
|||||||
on:click={edit}
|
on:click={edit}
|
||||||
on:keydown={keydown}
|
on:keydown={keydown}
|
||||||
on:keyup={keyup}
|
on:keyup={keyup}
|
||||||
|
on:blur={keyup}
|
||||||
>
|
>
|
||||||
{#if editing && pressedKeys.size === 0}
|
{#if editing && pressedKeys.size === 0}
|
||||||
<span>{$LL.configure.chords.HOLD_KEYS()}</span>
|
<span>{$LL.configure.chords.HOLD_KEYS()}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user