Honor Shift, Ctrl and Alt bindings in native mouse mode #4628
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4628
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4627"
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?
@F0RLE on GitHub · 2026-12-01 00:10 UTC · original
F0RLE:fix/native-ini-modifiers→main· +59 −14 · 1 files · 1 commits · openRefs #3801
What it changes
In native mouse mode, Windows reports left and right modifiers separately. A binding such as
A = Shiftin the existingbindings.initherefore misses both physical Shift keys.Match either side for plain
Shift,CtrlandAlt, and suppress the corresponding stock button so a remapped key does not fire both actions. Explicit left/right bindings still affect only that side. Left Shift and Left Ctrl retain vehicle pitch when the binding is generic. No config migration is needed.How it was tested
cargo test --release --locked --offline -j 2 -p victory-hle --libon4999167b: 471 passed, 13 ignored. Includes regression tests for both sides, stock-button suppression and vehicle pitch.cargo xtask policy: passed. No in-game test on this commit.Checked for overlap
Native.*overrides, and #4587 changes the shipped layout. This patch fixes generic modifiers in existing unprefixed bindings onmain.@Trillazill on GitHub · 2026-12-01 07:15 UTC · original
A layout problem in the lines this PR rewrites, which it keeps ("Keep both physical-position and virtual-key matching"): on a non-US layout a bound letter also fires by its US position.
On a French AZERTY keyboard the key labelled Q sits where a US keyboard has A (scan 0x1E), so
pad_keyreports it asA. With the commenter's file in #4537 (MoveLeft = Q,A = A), pressing Q also presses whatA = Abinds. That is the "Q is the rear brake at the same time" there. The same mix-up lets the table's button at a key's place fire for a key the file binds by label: the A key (US Q position) also presses the table's LB.bindings.ininames keys by their label (F1 KEY BINDINGS writes the virtual key that was pressed), so a bound key should count byvirtual_keyalone. A test on this branch shows it, withKeyState { scan_code: 0x1E, virtual_key: b'Q' }and bindings[(b'A', A)]:Suggested change in
stand_in_buttons. It keeps your generic-modifier handling and only drops the positional match for bound keys:On US layouts this gives the same buttons, since a letter's position and label agree there. With it,
cargo test -p victory-hle --lib -- gameinput::passes 99 (2 ignored), including your modifier tests and the AZERTY one above. I couldn't check it in game: the game's key-file input reports letters at US positions, so AZERTY can't be played through it. I can push it to a branch if that's easier to pick up.@andrewpozdnakov7-jpg on GitHub · 2026-12-01 09:14 UTC · original
I applied Trillazill's suggested fix on the exact PR head
4999167b. Explicit button bindings now use the key label from the active layout. A held key already claimed by a binding skips its stock button. Unbound buttons keep their positional defaults. Review commitThe new Windows/MSVC regression reproduced the extra A button bit (4) for the Q key on AZERTY. With
36f66ad0ccb32e3e1fea69715c0a8e2dfb236e61, Q no longer emits A, the key labelled A emits only its bound button, and removing the binding restores the positional shoulder button. The two existing modifier tests passed, including generic Shift/Ctrl/Alt and vehicle pitch, andcargo xtask policy --stagedaccepted the one-file change.This is the button-activation part of #4537. It is ready to cherry-pick into this PR with its Git author and co-author preserved. A run on the reporter's AZERTY setup is still needed.
AI-assisted with OpenAI Codex.
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.