Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (keyCode >= KeyCode.Alpha0 && keyCode <= KeyCode.Alpha9) | ||
| { | ||
| inputSystemKey = (Key)((int)Key.Digit0 + ((int)keyCode - (int)KeyCode.Alpha0)); | ||
| return true; | ||
| } |
There was a problem hiding this comment.
Fix Input System mapping for numeric keys
In the Input System path, numeric keycodes are converted via Key.Digit0 + offset, but Unity’s Key enum follows HID usage codes where Digit1–Digit9 precede Digit0 (Digit0 is 39, Digit1 is 30, etc.). As a result, when ENABLE_INPUT_SYSTEM is defined, pressing 1–9 (and the keypad digits just below this block) resolves to Keyboard.current[Key.Enter/Escape/…] instead of the digit controls, so KeyIsPressedUnit reports false for those numbers even though they’re held. Only 0 maps correctly. Please map each digit explicitly (or base off Key.Digit1 with a special case for 0) so numeric keys work under the Input System.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task