summaryrefslogtreecommitdiffstats
path: root/virtual-programs/web
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2024-05-16 09:41:28 +0000
committers-ol <s+removethis@s-ol.nu>2024-05-25 11:14:59 +0000
commit187608fae81ecc9f484bd829626a8ea07ff35d8c (patch)
treee631c579aea28991d541869adb7beb5c03e581b3 /virtual-programs/web
parentdirty loadlib fix (diff)
downloadfolk-187608fae81ecc9f484bd829626a8ea07ff35d8c.tar.gz
folk-187608fae81ecc9f484bd829626a8ea07ff35d8c.zip
Support regional keymaps via libkeymap or dumpkeys
Diffstat (limited to 'virtual-programs/web')
-rw-r--r--virtual-programs/web/web-keyboards.folk10
1 files changed, 5 insertions, 5 deletions
diff --git a/virtual-programs/web/web-keyboards.folk b/virtual-programs/web/web-keyboards.folk
index 6f18d962..54911b8f 100644
--- a/virtual-programs/web/web-keyboards.folk
+++ b/virtual-programs/web/web-keyboards.folk
@@ -23,16 +23,16 @@ When the keyboards are /keyboards/ {
ws.onopen = () => {
document.getElementById('status').innerHTML = "<span style=background-color:seagreen;color:white;>Connnected</span>";
send(`
- Assert when keyboard /kb/ claims key /k/ is down with modifiers /m/ timestamp /ts/ {{chan kb k m ts} {
+ Assert when keyboard /kb/ claims key /k/ is down with timestamp /ts/ printable /p/ {{chan kb k ts p} {
if {\$ts > [clock milliseconds]} {
- ::websocket::send \$chan text "\$kb||\$k"
+ ::websocket::send \$chan text "\$kb||\$p"
}
}} with environment \[list \$chan]
`);
};
ws.onclose = window.onbeforeunload = () => {
document.getElementById('status').innerHTML = "<span style=background-color:red;color:white;>Disconnnected</span>";
- send(`Retract when keyboard /kb/ claims key /k/ is down with modifiers /m/ timestamp /ts/ /anything/ with environment \[list \$chan]`)
+ send(`Retract when keyboard /kb/ claims key /k/ is down with timestamp /ts/ printable /b/ /anything/ with environment \[list \$chan]`)
setTimeout(() => { wsConnect(); }, 1000);
};
ws.onerror = (err) => {
@@ -41,8 +41,8 @@ When the keyboards are /keyboards/ {
ws.close();
}
ws.onmessage = (msg) => {
- const \[kb, key] = msg.data.split("||");
- document.getElementById(kb + "-presses").innerText += key + " ";
+ const \[kb, p] = msg.data.split("||");
+ document.getElementById(kb + "-presses").innerText += p + " ";
}
};
wsConnect();