aboutsummaryrefslogtreecommitdiffstats
path: root/keybinds/test_binds.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-23 15:16:44 +0200
committerDanilo M. <danix@danix.xyz>2026-10-23 15:16:44 +0200
commita44c3ebc3eacffde9dc0ec932aa74dc7faa95eb2 (patch)
tree713c53cd874126a5a18c3e4048776655c4a10bb5 /keybinds/test_binds.js
parent237e919e8807cd50856a493533b32cb0a06ae88c (diff)
downloadquickshell-a44c3ebc3eacffde9dc0ec932aa74dc7faa95eb2.tar.gz
quickshell-a44c3ebc3eacffde9dc0ec932aa74dc7faa95eb2.zip
keybinds: name the companion's code:49 bind
Hyprland 0.56.2 reports a Lua `code:N` bind with key "" and keycode 0 in `hyprctl binds -j`, while the bind itself works, so the reminder printed "Win + " with nothing after it. Such a bind is now named by its description, with "?" for one not listed, so a new keycode bind shows up as a visible gap rather than a blank. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'keybinds/test_binds.js')
-rw-r--r--keybinds/test_binds.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/keybinds/test_binds.js b/keybinds/test_binds.js
index df1e4b5..7b2289a 100644
--- a/keybinds/test_binds.js
+++ b/keybinds/test_binds.js
@@ -27,6 +27,8 @@ assert.strictEqual(B.keys({ modmask: 69, key: "F1" }), "Win + CTRL + SHIFT + F1"
assert.strictEqual(B.keys({ modmask: 0, key: "XF86AudioMute" }), "Mute");
assert.strictEqual(B.keys({ modmask: 64, key: "mouse:272" }), "Win + LMB");
assert.strictEqual(B.keys({ modmask: 0, key: "F5" }), "F5");
+// A keycode bind reports no key at all; it is named by its description.
+assert.strictEqual(B.keys({ modmask: 64, key: "", keycode: 0, description: "Desktop: Companion" }), "Win + \\");
// A key named like an Object.prototype member is not renamed.
assert.strictEqual(B.keys({ modmask: 0, key: "constructor" }), "constructor");