Web mirror: modified click at release point, every app clipboard write notified, NumLock-off numpad navigation

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 14:46:22 -04:00
1 parent b57d8e7da7
commit e0c388101f
4 files changed
+84 -3

No files matched your search

+3 -1
View File
@@ -154,7 +154,9 @@ keys.addEventListener("keydown", (e) => {
if (cmd && commands[e.code] && !e.altKey) {
send({ type: "command", text: e.code === "KeyZ" && e.shiftKey ? "redo" : commands[e.code] });
} else {
send({ type: "key", code: e.code, text: e.key.length === 1 ? e.key : "", mods: mods(e) });
// NumLock off: numpad keys act as navigation keys, named by e.key.
const code = e.code.startsWith("Numpad") && e.key.length > 1 && e.key !== "Enter" ? e.key : e.code;
send({ type: "key", code, text: e.key.length === 1 ? e.key : "", mods: mods(e) });
}
e.preventDefault();
});