input: fix ALT/GUI sticky keys when OSD opened.

This commit is contained in:
Sorgelig
2022-11-13 08:33:36 +08:00
parent 9b64fb67f2
commit 434cce3a14

View File

@@ -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;
}