[pr-fix][input] Keyboard: a bound key drives only its binding, letters as printed, defaults for the player's layout #364
Loading…
Reference in a new issue
No description provided.
Delete branch "EmberReD/Darner:fix/keys-by-printed-letter"
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?
Contributor role (optional)
What it changes
bindings.iniset to MoveUp = Z, MoveLeft = Q, MoveDown = S, MoveRight = D, RB = A. Pressing Q moved left and also took cover; the bindings did not apply as written, with ENGLISH KEYBOARD on or off.Two things caused it:
bindings.inistill reached the title's own keyboard handling (the GameInput keyboard device), so the title also ran its native action for that key. Q is the title's own Take Cover key.LETTER_POSITIONS), both the built-in table's and the file's. A file written with the letters the keyboard prints (ZQSD on AZERTY) named other keys than the ones pressed.What this does:
unboundingameinput.rs): a key the file binds to a button, trigger or stick drives only that binding. Keys the file does not bind still reach the title as before.pad_keyis the virtual key;mnk::samplereads the bound key itself). A file naming Q means the key marked Q, on any layout.DARNER_BINDINGS_ONLY=1). A table key the file uses for anything else is let go, as buttons already were (#5): Q bound to move left is no longer also the left shoulder.DARNER_BINDINGS_ONLYkeeps its meaning and stays off by default.bindings.iniis written for the player's layout: its one-letter keys go throughgameinput::printed_letters(the existingletter_in_layoutwith the layout Windows reports), so AZERTY gets Z/Q/S/D and RB = A. With ENGLISH KEYBOARD on and the US layout loaded, the US letters are kept, since the game window then reads US letters. Abindings.inibyte for byte as shipped holds none of the player's keys and is written again for the layout once; any other file is never written over (the existing test is extended for both).prompts::use_printed_letters) is removed: the prompts now show letters as the file and the table name them, which is what is pressed.What a player notices:
How it was tested
Tested revision:
e56ae682c6(one commit on mainf3840d7).Commands and results: see the gates below; new tests
the_files_move_keys_count_beside_the_tablesandbound_keys_are_kept_from_the_title;the_stand_in_pad_reads_letters_by_their_placebecamethe_stand_in_pad_reads_letters_as_printed;the_default_bindings_are_never_written_over_a_file_that_is_therecovers the layout and the shipped-file case.Changes a default: yes, for mouse and keyboard players on a layout other than US, and for anyone with a
bindings.ini(see "What a player notices").A/B result: not a speed change. Checked in the game (below) with the change off (the v2026.12.03.02 release: Q moved left and took cover) and on (Q moves left only; A is the right shoulder; E, left in the table, is still the right shoulder; prompts show the bound letters).
Gates run on that revision (Windows 10 22H2): gate 1 and gate 2 clean. Gate 3 with
--no-fail-fast: darner-hle 495 passed (15 ignored), darner 148 passed, darner-game and the other crates pass. Two crates fail here the same way they would on main, since neither depends on a changed crate (cargo tree): darner-shader, 65 card and WARP cases with "no SM 6.6 device available", and darner-gpu, whose test process exits with code 3.Gameplay: RTX 3070 Ti, Series S profile, 1080p to 1440p, DLSS quality, frame generation off, no ray tracing. AZERTY (French) keyboard, ENGLISH KEYBOARD on with no US layout loaded.
Shader wave sizes tested: not relevant (input only).
Hardware dependence: none expected; keyboard layout dependent, tested on AZERTY only.
Coverage gaps: QWERTZ and other layouts, and ENGLISH KEYBOARD with the US layout loaded, are covered by reading the code and tests only. A
bindings.iniwritten by a launcher with its own defaults is not rewritten (it is not the shipped file).Checklist
main.docs/asset-policy.md.Checked for overlap
gameinput.rs, other parts); #5 (merged, the same rule for buttons this extends to sticks and triggers).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.