From 434cce3a14b6c09ba015b194b05959658e5a1936 Mon Sep 17 00:00:00 2001 From: Sorgelig Date: Sun, 13 Nov 2022 08:33:36 +0800 Subject: [PATCH] input: fix ALT/GUI sticky keys when OSD opened. --- user_io.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/user_io.cpp b/user_io.cpp index 746286e..8587a30 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -3796,14 +3796,10 @@ void user_io_kbd(uint16_t key, int press) if (key == KEY_MENU) key = KEY_F12; if (key != KEY_F12 || !block_F12) { - if (osd_is_visible) - { - menu_key_set(UPSTROKE | key); - } - else - { - send_keycode(key, press); - } + if (osd_is_visible) menu_key_set(UPSTROKE | key); + + // these modifiers should be passed to core even if OSD is open or they will get stuck! + if (!osd_is_visible || key == KEY_LEFTALT || key == KEY_RIGHTALT || key == KEY_LEFTMETA || key == KEY_RIGHTMETA) send_keycode(key, press); } if (key == KEY_F12) block_F12 = 0; }