GetVirtualKeycode and GetCharacter threw for keyboard layouts 31 to 39,
and GetVirtualKeycode for the Y and Z keys of layouts 2, 3 and 12, which
ended the title. GetImeKeyboardType returns layouts 31 to 37 for seven
system languages, and layout 2 for another.
They now follow firmware 13.42's module: a layout the title's SDK does not
know returns INVALID_KEYBOARD_TYPE, and below PS5 SDK 0x04000000 or PS4
SDK 0x09000000 the Y and Z keys of layouts 2, 3 and 12 are swapped.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
LookUp is constexpr, so static_assert evaluates it for INT32_MIN and INT32_MAX in a constant expression, where signed overflow is an error. With the previous 32-bit subtraction the test file no longer compiles ('overflow in constant expression'); the existing runtime case for 0x80000000 only showed the overflow under UBSan.
sceUserServiceGetKeyboardType now returns the keyboard type of the configured
system language from the repository owner's table (languages 0 to 29), with 20
(US English) for a language outside it. The input variants stay 0, the only
value the table gives for Japanese and Traditional Chinese.
sceConvertKeycodeGetImeKeyboardType takes the PS4 client rule from the title ID
prefix (CUSA is PS4); a missing or custom ID is treated as PS5. Tests walk the
owner's table through both calls and the title ID cases; both debt entries
updated.
The initial user reported keyboard type 0, which the converter maps to IME type 0
and then rejects, so a title reading the layout still could not use it. Report 20
for sceUserServiceGetKeyboardType, which the owner's table maps to IME keyboard
type 4 (English, US); the Japanese and Traditional Chinese input variants stay 0.
Tests and both debt entries updated.