hle/gameinput: match keyboard controls by physical position, not letter #105
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/105"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by omeuniercombet on 2026-11-24T21:32:06Z.
Problem
Players on non-US keyboard layouts (AZERTY, QWERTZ, Dvorak...) have to remap movement keys manually: the stand-in gamepad looks up keys by virtual key code (letter), so pressing Z/Q on an AZERTY keyboard never triggers W/A.
Change
Imported from fxceless/victory-fork. Originally posted by Revens2 on 2026-11-25T07:10:07Z.
Measured on a French (fr-FR, AZERTY) Windows 11 machine, no game run: I mapped virtual keys to scan codes with
MapVirtualKeyW(vk, MAPVK_VK_TO_VSC)on the active layout.Two consequences, both from reading the code (not run in game):
VICTORY_KEYSlist goes through the same table:host::Host::pad/keys()build aKeyStatefrom the scripted virtual key withMapVirtualKeyW, so with this PR a script written asW,A,S,Don an AZERTY machine presses LT, the left shoulder, S, D. A script has to be writtenZ,Q,S,Dthere. Not a blocker, but the README / theVICTORY_KEYSdoc comment could say that scripted letters follow the active layout once this lands (orscripted()could carry the scan code of the US place directly).Not tested here: the PR's own tests (not built on this branch yet) and a real key press in game.
Written with an AI assistant (Claude).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.