feat(input): add browser-based input mapping configurator #3456
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3456"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by AMRYB on 2026-10-11T10:58:14Z.
What
Editing keyboard and mouse overrides currently requires writing
anyps5-input.iniby hand. Add a dependency-free browser configurator undertools/input-mapperfor all 31 actions supported by the native parser at83751168d.The editor provides alternative bindings, physical-key capture, searchable input menus, transactional INI import, validation, retained-default conflict warnings, preview, copy and download. Only configured actions are exported. The responsive interface includes separate Controls, Configuration and Help views, 22 interface/FAQ languages, English on first visit, saved language preferences and right-to-left layouts.
Rebased onto
mainat83751168d. The mapper includesScreenshot,Shake,StickModifierandTogglePerformanceOverlay, with native keyboard-only restrictions for screenshot, overlay and fullscreen. The defaults catalogue includes L2's R/X1 bindings, ToggleMouse's F7/middle mouse bindings, Shake's X, Screenshot's F12 and the overlay's F10; StickModifier has no default.The dedicated Input mapper workflow uses Node.js 22 and runs on every push to
main. Its pull-request trigger filters the mapper, workflow and native source files used by the contract tests. Publishing on the project's GitHub Pages site remains a follow-up.Run locally with Node.js 22 or later:
Open
http://127.0.0.1:4173. No package installation is needed. An earlier standalone preview is available at https://amryb.github.io/anyps5-controls/; it does not yet include this PR's latest native-action/default synchronization.Related to #392; this browser editor complements the native editor in #674 and does not configure physical controllers or numeric input settings. Native code is unchanged. The source-contract test currently reads
core/libs/prx/libSceVideoOut/src/InputMapping.cpp; if #674 moves it before this PR merges, that reference must be updated. Continues #2444, closed during the intake pause.Tested
83751168d:npm --prefix tools/input-mapper testpasses 22/22. Before synchronizing the mapper after the rebase, the same command reproduced 18 passing and 2 failing tests, as reported in review.node --check;git diff --checkand the local conventions checker pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:46:03Z.
Thanks, this matches the web page planned in #392. I checked the parser behaviour against
InputMapping.cpp(trim,#/;comments, case-insensitive type, KEY/MOUSE/WHEEL) and rannpm --prefix tools/input-mapper teston this PR merged ontomain: 20/20 pass. The tests read the native sources for the actions and defaults.Questions for @boykopovar @oneandonlydean before a detailed review:
tools/input-mapper(Node 22 for the local server and tests), given the native editor in #674?i18n.js, 1263 lines) are not reviewable here. Keep all, or start with English and add languages later?out/input-mapper/through the Progress workflow is left open in the PR.Imported from boykopovar/AnyPS5. Originally posted by AMRYB on 2026-10-11T12:20:30Z.
Thanks for taking the time to verify the parser behavior and run the tests against
main!Regarding the points raised:
I'm happy to adapt the PR based on @boykopovar's and @oneandonlydean's feedback. Thanks again!
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T13:37:25Z.
Review: DISMISSED
Thanks, and sorry for the wait. The direction is settled: the web page was planned in #392 and it is complementary to the native editor in #674, so no maintainer decision is pending. On this PR merged onto
main,npm --prefix tools/input-mapper testpasses 20/20 here.What is left before merging:
InputMapping.cppdefaults would not fail anything. Add a small workflow (pushtomainpluspull_request,actions/setup-nodewith Node 22,npm --prefix tools/input-mapper test). Do not add it toconventions.yml: it usespull_request_targetand must never execute PR code. Please also show once that it fails when a default in the sources changes.docs/user/INPUT_MAPPING.md:34-36has three blank lines in a row before## Web configurator; keep one.out/input-mapper/can stay a follow-up PR, but then drop the sentence about the Progress workflow in the docs, or say plainly that it is not published yet.Not checked here: browser behaviour (key capture, RTL layouts, the 22 translations, file download).
Imported from boykopovar/AnyPS5. Originally posted by AMRYB on 2026-10-11T17:37:11Z.
@adriadam10 Sorry for the delay — I was at college, and I started working on this task as soon as I got back. Thanks for clarifying the direction and for the review.
I've addressed the requested changes in d282ffa01:
.github/workflows/input-mapper.yml: it runsnpm --prefix tools/input-mapper teston pushes tomainand pull requests targetingmain, withactions/setup-nodeand Node.js 22. It has read-only repository permissions.conventions.ymlremains unchanged; no PR code was added to itspull_request_targetjob.## Web configuratorto one blank line.I also verified the requested failure case: I temporarily changed Cross's native default in
InputMapping.hppfromSDL_SCANCODE_RETURNtoSDL_SCANCODE_J, then ran the same npm test command. It exited 1, with 19 passing / 1 failing.built-in conflict catalogue agrees with the current native bindingsfailed onKEY:JversusKEY:Return.After restoring the native file byte-for-byte, the full suite passed 20/20 on Windows 11 with Node.js 24.19.0. The mutation is not included in the PR. The branch is rebased onto
a11c8f7f7; the local conventions check,git diff --check, and the GitHub Conventions check pass.The new Input mapper CI run is awaiting maintainer approval, so I cannot report a Node.js 22 CI result yet. Could a maintainer approve that run, and could you re-review the changes when convenient?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T14:27:11Z.
Windows run of head
d282ffa01merged onto currentmain(8fa5cc486, clean merge, onlydocs/user/INPUT_MAPPING.mdauto-merged): Windows 10 (19045), Node.js 24.20.0,npm --prefix tools/input-mapper test: 20 tests, 20 pass, 0 fail (exit 0). That includes the tests that read the native defaults fromInputMapping.hpp.Not checked: the browser UI (capture, import, download), the new workflow on GitHub, and a game run with a generated
anyps5-input.ini; no native code is built or changed by this PR.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by AMRYB on 2026-10-14T01:28:38Z.
Hi @adriadam10, the Input mapper CI now passes, and the requested changes are addressed. Could you take another look when you have time, or let me know if anything else is needed? Thanks!
Imported from boykopovar/AnyPS5. Originally posted by AMRYB on 2026-10-14T11:46:55Z.
Thanks for the update and for following up, @oneandonlydean. No problem — I'm happy to wait for the response.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T16:21:42Z.
Thanks for adding the workflow. I merged d282ffa01 onto current
main(10e2cbf64; the merge is clean) and rannpm --prefix tools/input-mapper testthere with Node 24: 18 pass, 2 fail.action names and pad button categories agree with the current native parserbuilt-in conflict catalogue agrees with the current native bindingsOn the PR head alone all 20 pass, so these are your drift checks catching real changes on
main: since your base the native parser has gained four actions (Screenshot,Shake,StickModifier,TogglePerformanceOverlay; 27 to 31), and some default bindings changed (for example the default L2 and the capture hotkey). As it stands, the new workflow would fail on the next push tomain.Could you rebase onto
main, add the four actions to the mapper, and update the defaults catalogue until both tests pass?Also note that #674 moves
core/libs/prx/libSceVideoOut/src/InputMapping.cpp, whichtests/mapping.test.jsreads. If it merges first, that path needs updating.Imported from boykopovar/AnyPS5. Originally posted by AMRYB on 2026-10-20T17:15:18Z.
Hi @oneandonlydean, I've addressed your requests in
c75d7bfde:mainat83751168d; the merge is clean.Screenshot,Shake,StickModifierandTogglePerformanceOverlay, bringing the mapper to 31 actions.Before the changes, I reproduced the 18 passing / 2 failing result after rebasing. The updated suite now passes 22/22 locally, and the Input mapper CI and Conventions checks pass on the new head.
I also added the PR file filters required by the current CI rules. The full Windows/Linux builds and unrelated register-context/write-watch jobs were skipped by the existing workflow conditions; the relinker checks passed.
The parser remains at its current path. If #674 merges first and moves it, I'll update the test reference accordingly. The PR description now reflects the changes and validation. Thanks for the review!
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T17:51:21Z.
@adriadam10 could you take another look when you have a moment? Your 11 Oct review was on 36fe0191c0. The current head
c75d7bfdeis rebased ontomain. The mapper's action list now matches the native parser: 31 actions, checked by drift tests that read the parser sources, andnpm --prefix tools/input-mapper testpasses 22/22 on main + this PR. The input-mapper workflow is green on this head, and it now has apull_requestpaths filter (still read-only). The 22 interface languages and publishing via the Progress workflow are still your call. If the rest looks right to you, an updated review would clear your change request.