Repository navigation
8000
div>
zdxsv: USB keyboard sends the physical key (Japanese keyboard layout) - #552
Merged
Merged
Conversation
…pes as one Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
The host key event's native scan code goes along with the key to the CPU thread (
KeyboardHooks.h). On Windows, the HID keyboard (hidkbd) sends that physical key (PS/2 set 1 number) to the game, not the key looked up by its character name. Without a scan code (other platforms, Pause), the name lookup stays.Rationale behind Changes
For #551. Qt names a key by the character the host layout gives it. The game reads a Japanese layout. So on a Japanese keyboard
@,:,^(QtAt,Colon,AsciiCircum) had no USB key and were dropped, and shifted keys were remapped by the US shift table. This also fixes upstream code: upstreamhidkbdbehaves the same. A US layout gives the same keys as before, so there is no setting to turn this off.Suggested Testing Steps
@ : ^ Athen Enter twice. The lobby echo is@:^あ. Control (the same build withHostKeyNumberreturning 0):あonly.Shift+7gave’.keybd_eventwith scan codes), ¥ / ろ /_/"(the game's chat character set does not seem to have them, so they did not show up).Did you use AI to help find, test, or implement this issue or feature?
Yes. Claude Code found the cause, wrote the change and ran the rig.
🤖 Generated with Claude Code