From 102d1c9a9b61eef1f9620570e3c3838e402c2c63 Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Mon, 6 Jul 2026 00:22:51 +0200 Subject: [PATCH] Unset Shift and Ctrl for arrow keys (closes #1015) Signed-off-by: AnErrupTion --- ly-ui/src/keyboard.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ly-ui/src/keyboard.zig b/ly-ui/src/keyboard.zig index a90148b..626f21f 100644 --- a/ly-ui/src/keyboard.zig +++ b/ly-ui/src/keyboard.zig @@ -167,6 +167,12 @@ pub fn getKeyList(allocator: Allocator, tb_event: termbox.tb_event) !KeyList { 21 => key.right = true, else => {}, } + + if (code >= 18 and code <= 21) { + // https://github.com/termbox/termbox2/blob/605398fa79108412976191e062ea14bd4bd30213/termbox2.h#L446 + key.ctrl = false; + key.shift = false; + } } else if (tb_event.ch < 128) { const code = if (tb_event.ch == 0 and tb_event.key < 128) tb_event.key else tb_event.ch;