feat(libScePad): bind L2 to R and the first mouse side button #7497

Merged
AlxcBTW merged 1 commit from upstream-pr/7497 into main 2026-10-18 20:22:12 +00:00
AlxcBTW commented 2026-10-18 09:35:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-18T09:35:43Z.


What

docs/user/INPUT_MAPPING.md says "L2 has no built-in keyboard or mouse binding". R2 sits on the right mouse button, so with the built-in bindings a title that needs L2 (aim, brake, a shoulder menu) cannot be played with keyboard and mouse until the player writes an anyps5-input.ini.

This adds two built-in L2 bindings: the key R and the mouse side button 4 (X1). Both were unbound before, so no existing binding changes. The key R is beside E (R1) and clear of the stick keys WASD and FHTG. An L2 = ... line in anyps5-input.ini replaces both, like any action. Pressing either sets the digital L2 bit and an analog value of 255, as R2 does.

The default-bindings table in docs/user/INPUT_MAPPING.md gets the L2 row and the sentence about L2 is removed.

Tested

  • Linux (Ubuntu 24.04, GCC 13, Mesa lavapipe runner), fork CI at 2d5317861c (the PR head 367d46e48 plus the CI scaffolding commit; run 39113810428, ctest -R '^(pad_|guest_pad|video_out_mouse|mouse_input|keyboard_input)'): 9 of 9 passed, among them pad_keyboard_mouse. Not run on Windows.
  • New check in pad_keyboard_mouse: R and mouse button 4 each press L2 with analog 255, leave R2 alone, and release it again.
  • Not tested in a game.
  • python3 tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py lists no overlap with a comparable pull request; #674 and #4891 could not be compared (they touch docs/user/INPUT_MAPPING.md, #4891 also InputMapping.hpp) and neither adds an L2 binding. Based on cdb7ed035.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4908010023 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7497). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-18T09:35:43Z. --- ### What `docs/user/INPUT_MAPPING.md` says "`L2` has no built-in keyboard or mouse binding". `R2` sits on the right mouse button, so with the built-in bindings a title that needs L2 (aim, brake, a shoulder menu) cannot be played with keyboard and mouse until the player writes an `anyps5-input.ini`. This adds two built-in `L2` bindings: the key `R` and the mouse side button 4 (`X1`). Both were unbound before, so no existing binding changes. The key `R` is beside `E` (`R1`) and clear of the stick keys WASD and FHTG. An `L2 = ...` line in `anyps5-input.ini` replaces both, like any action. Pressing either sets the digital L2 bit and an analog value of 255, as `R2` does. The default-bindings table in `docs/user/INPUT_MAPPING.md` gets the `L2` row and the sentence about L2 is removed. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> - Linux (Ubuntu 24.04, GCC 13, Mesa lavapipe runner), fork CI at 2d5317861c (the PR head 367d46e48 plus the CI scaffolding commit; run 39113810428, ctest `-R '^(pad_|guest_pad|video_out_mouse|mouse_input|keyboard_input)'`): 9 of 9 passed, among them `pad_keyboard_mouse`. Not run on Windows. - New check in `pad_keyboard_mouse`: `R` and mouse button 4 each press L2 with analog 255, leave R2 alone, and release it again. - Not tested in a game. - `python3 tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py` lists no overlap with a comparable pull request; #674 and #4891 could not be compared (they touch `docs/user/INPUT_MAPPING.md`, #4891 also `InputMapping.hpp`) and neither adds an `L2` binding. Based on cdb7ed035. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-18 10:31:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T10:31:37Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 674 docs/user/INPUT_MAPPING.md
PR 4891 core/libs/prx/libScePad/include/InputMapping.hpp
docs/user/INPUT_MAPPING.md
PR 6353 core/libs/prx/libScePad/include/InputMapping.hpp
core/libs/prx/libSceVideoOut/tests/KeyboardMouse.cpp
docs/user/INPUT_MAPPING.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248784570 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7497#issuecomment-6248784570). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T10:31:37Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 674](https://www.github.com/boykopovar/AnyPS5/pull/674) | `docs/user/INPUT_MAPPING.md` | | [PR 4891](https://www.github.com/boykopovar/AnyPS5/pull/4891) | `core/libs/prx/libScePad/include/InputMapping.hpp`<br>`docs/user/INPUT_MAPPING.md` | | [PR 6353](https://www.github.com/boykopovar/AnyPS5/pull/6353) | `core/libs/prx/libScePad/include/InputMapping.hpp`<br>`core/libs/prx/libSceVideoOut/tests/KeyboardMouse.cpp`<br>`docs/user/INPUT_MAPPING.md` |
LeandroLP23 commented 2026-10-18 16:44:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T16:44:33Z.


Windows run, since the description lists Windows as not run. Windows 11 26300, Ryzen AI 7 350, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. Build: main 6efb7261b with #6648, #7559, #7496, #7497 and #7498 merged together (each merge clean, built once).

pad_keyboard_mouse and pad_input_mapping pass 3 runs of 3. The output includes this PR's default L2 line, so the new checks ran on Windows.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252461873 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7497#issuecomment-6252461873). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T16:44:33Z. --- Windows run, since the description lists Windows as not run. Windows 11 26300, Ryzen AI 7 350, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. Build: `main` `6efb7261b` with #6648, #7559, #7496, #7497 and #7498 merged together (each merge clean, built once). `pad_keyboard_mouse` and `pad_input_mapping` pass 3 runs of 3. The output includes this PR's `default L2` line, so the new checks ran on Windows. AI-assisted
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!7497
No description provided.