add all keyboard langs to backstage + fix test

This commit is contained in:
KingKDot
2026-07-30 14:59:00 -05:00
parent 91e9b3196a
commit 7369aa7014
10 changed files with 132 additions and 21 deletions
+10 -1
View File
@@ -1740,7 +1740,16 @@ import { createSharedUiSettingsSaver, loadSharedUiSettings } from "./shared-ui-s
const kbdCapture = createKeyboardCapture({
container: canvasContainer,
sendKeyDown: (e) => {
if (desiredStreaming) sendCmd("backstage_key_down", { key: e.key, code: e.code });
if (!desiredStreaming) return;
const altGraph = typeof e.getModifierState === "function" && e.getModifierState("AltGraph");
const printable = typeof e.key === "string"
&& Array.from(e.key).length === 1
&& (!e.ctrlKey && !e.metaKey && !e.altKey || altGraph);
sendCmd("backstage_key_down", {
key: e.key,
code: e.code,
text: printable ? e.key : "",
});
},
sendKeyUp: (e) => {
if (desiredStreaming) sendCmd("backstage_key_up", { key: e.key, code: e.code });