From f1bc3926646ea7f6d9619ad8516651236a2b8d48 Mon Sep 17 00:00:00 2001 From: Shane McGovern Date: Wed, 26 Aug 2026 12:01:43 +0100 Subject: [PATCH] fix(kit): open VirtualKeyboard on pointer click as well as D-pad activation on handhelds --- src/ui/kit/Kit.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ui/kit/Kit.lua b/src/ui/kit/Kit.lua index 3eb57b28..0a0867e1 100644 --- a/src/ui/kit/Kit.lua +++ b/src/ui/kit/Kit.lua @@ -848,7 +848,12 @@ function Kit.textfield(id, x, y, w, h, value, placeholder) local focusRing = Kit.focusable(id, x, y, w, h) value = tostring(value or "") - if Kit._activateId == id and not mobile() then + local isHandheld = os.getenv("HANDHELD") == "1" or os.getenv("PORTMASTER") == "1" + or os.getenv("POKEPORT_HANDHELD") == "1" or os.getenv("TRIMUI") == "1" + or os.getenv("MUOS") == "1" or os.getenv("KNULLI") == "1" + + local clickedOrActivated = (Kit._activateId == id) or (isHandheld and Kit.press(x, y, w, h)) + if clickedOrActivated and not mobile() then VirtualKeyboard.open({ text = value, targetId = id,