Skip to content

webOS: BT keyboard text caret vs Magic Remote OSK navigation - #19275

Merged
LibretroAdmin merged 1 commit into
libretro:masterfrom
theromis:fix/webos-bt-kbd-osk-caret
Jul 29, 2026
Merged

webOS: BT keyboard text caret vs Magic Remote OSK navigation#19275
LibretroAdmin merged 1 commit into
libretro:masterfrom
theromis:fix/webos-bt-kbd-osk-caret

Conversation

@theromis

Copy link
Copy Markdown
Contributor

Summary

  • While a menu text field / OSK is open, distinguish Magic Remote from a Bluetooth keyboard
  • Remote arrows / OK / digit row keep driving the on-screen keyboard grid
  • After a real typing key from a BT keyboard, ←/→ move the text caret, ↑/↓ act as home/end, and Enter / numpad Enter save the line (instead of inserting ? / a square glyph)
  • Remote number buttons no longer flip the session into caret mode

Test plan

  • webOS: open a string setting with Magic Remote only — D-pad moves OSK highlight, OK selects, digit row inserts digits without switching mode
  • Connect BT keyboard, type letters (or punctuation / numpad), then ←/→ move caret; ↑/↓ jump to start/end; Enter saves
  • Numpad Enter saves even before other typing keys
  • Shift+letter still produces capitals (regression check for sdl_input: fix Shift leaking '?' and blocking capitals in text fields #19266)
  • Gamepad OSK navigation still works when a controller is connected

After a physical typing key, arrows move the caret (↑/↓ as home/end) and
Enter/numpad Enter save the line. Remote arrows/OK/digits stay on the OSK
grid so number buttons do not flip into caret mode.
@cscd98

cscd98 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Tested works, thanks 👍

@LibretroAdmin
LibretroAdmin merged commit 8ba5ee1 into libretro:master Jul 29, 2026
44 checks passed
@LibretroAdmin

LibretroAdmin commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Please be more careful in the future with this webOS specific code that touches core SDL files in RetroArch. sdl_input.c is a very generic SDL input driver that gets used by tons of other platforms and devices. Introducing highly specific webOS code like this without proper ifdef guards around it could be a very big compatibility issue

LibretroAdmin added a commit that referenced this pull request Jul 29, 2026
The Enter/numpad-Enter character override added in #19275 was placed
outside the WEBOS guard, so it ran on every SDL platform. On the common
path it is at best a no-op and at worst a regression:

* With no modifiers held, input_keymaps_translate_rk_to_ascii() already
  returns '\r' for RETROK_RETURN and '\n' for RETROK_KP_ENTER, and the
  line editor saves on either, so the override changed nothing.
* With Alt/Ctrl/Meta held, the translation deliberately returns no
  character so that hotkey chords cannot type. The unconditional
  override bypassed that: Alt+Enter (e.g. the fullscreen toggle chord)
  with a menu text field open would submit the half-typed line, and
  cores received a spurious '\r' character on chorded Enter.

Move the override under #ifdef WEBOS next to the existing numpad-Enter
phys-kbd latch, restoring pre-#19275 character semantics on all other
SDL platforms while keeping the webOS behaviour intact.
@theromis

Copy link
Copy Markdown
Contributor Author

it looked like common issue, this is why adopted it everywhere
looking at last commit, sounds like having system macro for SYSTEM_CR which will be "\n" or "\r" or "\r\n" for different systems can be a good improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants