From 5cb9f695901abcc011ef6974e70b5ead3de3e604 Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Mon, 17 Aug 2026 21:21:54 +0900 Subject: [PATCH] wl: every keycode evdev can send The bitmap held 256, and forward dropped anything above it rather than passing it on, so a key the engine does not want vanished instead of reaching the client. Keys do live up there: KEY_FN is 0x1d0, KEY_VOICECOMMAND 0x246, KEY_MACRO1 0x290, and xkeyboard-config maps keycodes to , so they carry a keysym and are nothing special to us. sway matches its bindings before it hands a key to the grab, so an unbound one of those was lost for as long as any text field had the focus. The whole evdev range costs 96 bytes of bitmap instead of 32. The test already writes the bound rather than the number, so it still says what it said. Co-Authored-By: Claude Opus 5 (1M context) --- wl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wl.c b/wl.c index 0830fbe..f3c84df 100644 --- a/wl.c +++ b/wl.c @@ -18,7 +18,7 @@ enum { Purposepassword = 8, Purposepin = 9, - Maxcode = 8*32, /* keycodes the forwarded bitmap holds */ + Maxcode = 0x300, /* KEY_MAX+1: what evdev can send */ }; /*