feat(libSceConvertKeycode): implement sceConvertKeycodeGetCharacterFr… #6797

Closed
Nik1313132 wants to merge 1 commit from upstream-pr/6797 into main
Nik1313132 commented 2026-10-16 12:25:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Nik1313132 on 2026-10-16T12:25:48Z.


What

Implement sceConvertKeycodeGetCharacterFromKeyboardData in libSceConvertKeycode.

Tested

Windows, built with MSVC and passed local build checks and unit tests.

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
  • [n/a] GPUs tested:
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4888335014 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6797). Originally posted by [Nik1313132](https://github.com/Nik1313132) on 2026-10-16T12:25:48Z. --- ### What Implement `sceConvertKeycodeGetCharacterFromKeyboardData` in `libSceConvertKeycode`. ### Tested Windows, built with MSVC and passed local build checks and unit tests. ### Checklist - [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 - [n/a] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes
MarcZX10 commented 2026-10-16 12:30:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T12:30:49Z.


The current conventions failures are because the PR body is still the untouched template (What/Tested are empty and the checklist is unchecked). Before this new export is ready for review, please document the source for the four-argument ABI and the state/type semantics, plus focused tests for null output, unsupported state/type, and representative keycodes. As written, UsCharacter always returns lowercase letters and ignores key state; please clarify whether that is the intended contract for GetCharacterFromKeyboardData and add coverage for it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6215544665 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6797#issuecomment-6215544665). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T12:30:49Z. --- The current conventions failures are because the PR body is still the untouched template (`What`/`Tested` are empty and the checklist is unchecked). Before this new export is ready for review, please document the source for the four-argument ABI and the state/type semantics, plus focused tests for null output, unsupported state/type, and representative keycodes. As written, `UsCharacter` always returns lowercase letters and ignores key state; please clarify whether that is the intended contract for `GetCharacterFromKeyboardData` and add coverage for it.
MarcZX10 commented 2026-10-16 12:41:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T12:41:35Z.


The latest conventions run (38902106914) still reports eight errors: commit subject Update Export.cpp is not Conventional Commits; Tested is empty; checklist answers are missing for notes/images, third-party code, Depends on, Unblocks, and AI-assisted; and Depends on must be #N or none. My earlier review questions about the source for the four-argument ABI, state/type semantics, and focused regression cases are still outstanding.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6215725159 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6797#issuecomment-6215725159). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T12:41:35Z. --- The latest conventions run (38902106914) still reports eight errors: commit subject `Update Export.cpp` is not Conventional Commits; `Tested` is empty; checklist answers are missing for notes/images, third-party code, `Depends on`, `Unblocks`, and `AI-assisted`; and `Depends on` must be `#N` or `none`. My earlier review questions about the source for the four-argument ABI, state/type semantics, and focused regression cases are still outstanding.
Nik1313132 commented 2026-10-16 13:05:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Nik1313132 on 2026-10-16T13:05:39Z.

Review: COMMENTED


Fixed

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5548162842 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6797#pullrequestreview-5548162842). Originally posted by [Nik1313132](https://github.com/Nik1313132) on 2026-10-16T13:05:39Z. **Review:** COMMENTED --- Fixed
github-actions[bot] commented 2026-10-19 08:29:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T08:29:55Z.


Progress report (82ddae7 → 6338f7c)

📈 System libraries: 88.86% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceConvertKeycode sceConvertKeycodeGetCharacterFromKeyboardData
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263025113 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6797#issuecomment-6263025113). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T08:29:55Z. --- <!-- progress-report --> ### Progress report (82ddae7 → 6338f7c) 📈 **System libraries**: 88.86% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceConvertKeycode | `sceConvertKeycodeGetCharacterFromKeyboardData` | </details>
adriadam10 commented 2026-10-19 08:30:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T08:30:17Z.

Review: CHANGES_REQUESTED


Thanks for the PR. Still open from the earlier review:

  • No source for the signature. sceConvertKeycodeGetCharacterFromKeyboardData is implemented with the same body and (keycode, state, type, char16_t*) ABI as sceConvertKeycodeGetCharacter, but the name suggests it takes a keyboard-data structure, not loose arguments. KytyPS5, shadPS4 and fpPS4 only list the name. Please cite where the argument list and semantics come from (or measure them), or keep it throwing.
  • No tests. Please add a guest test registered in ctest: null output, unsupported state/type (throws), and representative keycodes, with expected values from the cited source rather than from this code.
  • An inferred signature and the always-lowercase output (state/Shift ignored) need a line in the library's TechnicalDebt file under "Unknown function info".
  • Export.cpp:41-47 duplicates sceConvertKeycodeGetCharacter line for line. If the contract really is identical, share one helper.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5568819956 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6797#pullrequestreview-5568819956). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T08:30:17Z. **Review:** CHANGES_REQUESTED --- Thanks for the PR. Still open from the earlier review: - No source for the signature. `sceConvertKeycodeGetCharacterFromKeyboardData` is implemented with the same body and `(keycode, state, type, char16_t*)` ABI as `sceConvertKeycodeGetCharacter`, but the name suggests it takes a keyboard-data structure, not loose arguments. KytyPS5, shadPS4 and fpPS4 only list the name. Please cite where the argument list and semantics come from (or measure them), or keep it throwing. - No tests. Please add a guest test registered in ctest: null output, unsupported state/type (throws), and representative keycodes, with expected values from the cited source rather than from this code. - An inferred signature and the always-lowercase output (state/Shift ignored) need a line in the library's TechnicalDebt file under "Unknown function info". - `Export.cpp:41-47` duplicates `sceConvertKeycodeGetCharacter` line for line. If the contract really is identical, share one helper.

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!6797
No description provided.