feat(input): add browser-based input mapping configurator #2444

Closed
AMRYB wants to merge 1 commit from upstream-pr/2444 into main
AMRYB commented 2026-10-09 20:56:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AMRYB on 2026-10-09T20:56:46Z.


What

Editing keyboard and mouse overrides currently requires writing anyps5-input.ini by hand. Add a dependency-free browser configurator under tools/input-mapper for all 27 actions supported by the current parser.

The editor provides multiple alternative bindings, physical-key capture, searchable input menus, INI import, validation, conflict warnings, preview, copy and download. Only explicitly configured actions are exported; omitted actions retain their built-in inputs. Invalid imports preserve the current configuration. 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.

Related to #392. #674 provides a native input editor, including keyboard/mouse editing and controller profiles. This contribution supplies the browser/static-hosting option using the format already on main. It does not implement the proposed NONE, numeric-scancode or physical-controller extensions in #674, so it does not close the controller-mapping request by itself. No parser or emulator runtime changes are included.

Update the existing input documentation with local run/test commands and the static asset list. The existing Progress workflow can publish these assets under out/input-mapper/; publication and its dashboard link are left for maintainer review.

To try it from the repository root with Node.js 22 or later:

npm --prefix tools/input-mapper start

Open http://127.0.0.1:4173. No package installation is needed.

Tested

  • Windows 11, Node.js 24.19.0: npm --prefix tools/input-mapper test — 20 tests pass. Covers parser/default contracts against the current native sources, supported actions and input types, serialization, deduplication, incomplete/invalid bindings, retained-default conflicts, malformed imports, round trips, keyboard conversion and language preferences.
  • node --check for every JavaScript module and git diff --check pass.
  • Local browser checks cover physical-key capture, alternate bindings, exact-name search, type/value changes, keyboard selection and cancellation, malformed-search feedback, language changes without losing bindings, fresh-visit English and layouts at 320, 375, 768 and 1280 pixels. The integrated copy was also launched locally and produced Cross = KEY:F and Cross = KEY:Space in the preview. Clipboard permission denial correctly exposes the selected-preview fallback. The download action was triggered; the in-app browser did not expose a completed download event, so saved-file creation was not independently verified there.
  • No commercial title, homebrew session, physical controller or full emulator build was tested. Native code is unchanged.

Checklist

  • Based on current main; no other open PR implements this browser configurator. The native-editor overlap with #674 is described above.
  • One topic per PR; follow-ups go in a new PR.
  • No new code comments.
  • No changes to unimplemented exports or silent stubs.
  • No notes, investigation files or images added to the repository.
  • No new third-party code or dependencies.
  • Generic behavior, not specific to one title.
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4805780106 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2444). Originally posted by [AMRYB](https://github.com/AMRYB) on 2026-10-09T20:56:46Z. --- ### What Editing keyboard and mouse overrides currently requires writing `anyps5-input.ini` by hand. Add a dependency-free browser configurator under `tools/input-mapper` for all 27 actions supported by the current parser. The editor provides multiple alternative bindings, physical-key capture, searchable input menus, INI import, validation, conflict warnings, preview, copy and download. Only explicitly configured actions are exported; omitted actions retain their built-in inputs. Invalid imports preserve the current configuration. 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. Related to #392. #674 provides a native input editor, including keyboard/mouse editing and controller profiles. This contribution supplies the browser/static-hosting option using the format already on `main`. It does not implement the proposed `NONE`, numeric-scancode or physical-controller extensions in #674, so it does not close the controller-mapping request by itself. No parser or emulator runtime changes are included. Update the existing input documentation with local run/test commands and the static asset list. The existing Progress workflow can publish these assets under `out/input-mapper/`; publication and its dashboard link are left for maintainer review. To try it from the repository root with Node.js 22 or later: ```sh npm --prefix tools/input-mapper start ``` Open `http://127.0.0.1:4173`. No package installation is needed. ### Tested - Windows 11, Node.js 24.19.0: `npm --prefix tools/input-mapper test` — 20 tests pass. Covers parser/default contracts against the current native sources, supported actions and input types, serialization, deduplication, incomplete/invalid bindings, retained-default conflicts, malformed imports, round trips, keyboard conversion and language preferences. - `node --check` for every JavaScript module and `git diff --check` pass. - Local browser checks cover physical-key capture, alternate bindings, exact-name search, type/value changes, keyboard selection and cancellation, malformed-search feedback, language changes without losing bindings, fresh-visit English and layouts at 320, 375, 768 and 1280 pixels. The integrated copy was also launched locally and produced `Cross = KEY:F` and `Cross = KEY:Space` in the preview. Clipboard permission denial correctly exposes the selected-preview fallback. The download action was triggered; the in-app browser did not expose a completed download event, so saved-file creation was not independently verified there. - No commercial title, homebrew session, physical controller or full emulator build was tested. Native code is unchanged. ### Checklist - [x] Based on current `main`; no other open PR implements this browser configurator. The native-editor overlap with #674 is described above. - [x] One topic per PR; follow-ups go in a new PR. - [x] No new code comments. - [x] No changes to unimplemented exports or silent stubs. - [x] No notes, investigation files or images added to the repository. - [x] No new third-party code or dependencies. - [x] Generic behavior, not specific to one title. - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-09 21:08:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T21:08:05Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089284360 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2444#issuecomment-6089284360). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T21:08:05Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!2444
No description provided.