summaryrefslogtreecommitdiff
path: root/test-client/main.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-26 13:25:28 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-26 13:26:09 +0200
commitaf1221c3e3ba55f99d3a5dc0983c67f3bdda525f (patch)
treeca072538361807738397e0a8cb4f1e2cb1b23098 /test-client/main.ts
parentcf24bc076e9d3746210e507875a7178df19b51b1 (diff)
downloadhurrycurry-af1221c3e3ba55f99d3a5dc0983c67f3bdda525f.tar
hurrycurry-af1221c3e3ba55f99d3a5dc0983c67f3bdda525f.tar.bz2
hurrycurry-af1221c3e3ba55f99d3a5dc0983c67f3bdda525f.tar.zst
reverse instant recipe output when input is reversed
Diffstat (limited to 'test-client/main.ts')
-rw-r--r--test-client/main.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/test-client/main.ts b/test-client/main.ts
index 04cd2331..42c1a3e0 100644
--- a/test-client/main.ts
+++ b/test-client/main.ts
@@ -201,6 +201,8 @@ function keyboard(ev: KeyboardEvent, down: boolean) {
if (HANDLED_KEYS.includes(ev.code)) ev.preventDefault()
if (!keys_down.has("Space") && ev.code == "Space" && down) set_interact(true)
if (keys_down.has("Space") && ev.code == "Space" && !down) set_interact(false)
+ if (down && !ev.shiftKey && ev.code == "KeyK") send({ type: "communicate", message: { text: "/start" } })
+ if (down && ev.shiftKey && ev.code == "KeyK") send({ type: "communicate", message: { text: "/end" } })
if (down) keys_down.add(ev.code)
else keys_down.delete(ev.code)
}