From 6edf3740117fc6218e6062b7a6315ecfbba9fd33 Mon Sep 17 00:00:00 2001 From: WizzardSK <42868978+WizzardSK@users.noreply.github.com> Date: Tue, 13 Oct 2026 09:37:47 +0200 Subject: [PATCH] libretro: option to disable the virtual keyboard A core option Virtual Keyboard (enabled by default) turns the on-screen keyboard off altogether, for when a real keyboard is used; it replaces the Disabled choice of Virtual Keyboard Button. --- src/retro/options.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/retro/options.c b/src/retro/options.c index 717c4d0cb..0eb554074 100644 --- a/src/retro/options.c +++ b/src/retro/options.c @@ -582,6 +582,20 @@ static struct retro_core_option_v2_definition option_defs_us[] = { }, "disabled" }, + { + "hatari_vkbd", + "Virtual Keyboard", + "Virtual Keyboard", + "The on-screen keyboard, shown and hidden with the button chosen below. Disable it when a real keyboard is used, so that no RetroPad button brings it up.", + NULL, + "devices", + { + { "enabled", NULL }, + { "disabled", NULL }, + { NULL, NULL }, + }, + "enabled" + }, { "hatari_vkbd_button", "Virtual Keyboard Button", @@ -596,7 +610,6 @@ static struct retro_core_option_v2_definition option_defs_us[] = { { "l", "L" }, { "l3", "L3" }, { "r3", "R3" }, - { "disabled", NULL }, { NULL, NULL }, }, "x" @@ -916,6 +929,9 @@ void Core_ApplyRuntimeOptions(void) for (i = 0; i < (int)(sizeof(buttons) / sizeof(buttons[0])); i++) if (!strcmp(str, buttons[i].name)) id = buttons[i].id; + /* Disabled, no button shows it, and one that is shown goes away */ + if (!Core_VarBool("hatari_vkbd", true)) + id = -1; Vkbd_SetToggleButton(id); str = Core_VarStr("hatari_vkbd_theme", "beige");