szn

Bug 51 — key.format — alt and meta modifiers collide on M- prefix

51. key.format — alt and meta modifiers collide on M- prefix

File: src/key.zig:220–224 Severity: HIGH Status: ✅ FIXED — key format/prependModifiers updated to format meta as “Meta-“, parseKeyName updated to parse “Meta-“.

if (mod.alt)  { buf[pos] = 'M'; buf[pos + 1] = '-'; pos += 2; }
if (mod.shift) { buf[pos] = 'S'; buf[pos + 1] = '-'; pos += 2; }
if (mod.meta) { buf[pos] = 'M'; buf[pos + 1] = '-'; pos += 2; }

alt → M-, meta → M- — same prefix. A key with both alt and meta set produces M-M-Key, indistinguishable from alt-only. Additionally, meta is never actually set by the InputReader kitty parser (src/tty/tty_key.zig only reads bits 0-2: shift/alt/ctrl), making the meta format branch dead code. Logging output from server.zig:605-607 and server.zig:658-659 uses key.format() for tracing, so misreported modifiers show in show-messages.