fix(input): Walk mode set to Hold in the Insert menu drops a toggled walk #537
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8015c9a
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!537
Loading…
Reference in a new issue
No description provided.
Delete branch "jarynclouatre/Longshot:fix/walk-hold-in-menu"
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?
Type: fix · Risk: low · Tested on: Linux x86-64 (game-free checks only) · Needs: none
Why
#66 says choosing Hold clears a toggled walk.
walk_held(host/nn_hid.c) cleared it for Hold only on a read the game owns. While the Insert menu has the keys,read_inputpassesreadable0, and the function returned before reaching the Hold reset.None filed. Found reading
walk_heldagainst #66's description.How to reproduce
Seen on: found reading the code; not seen in the game
Settings and switches: Walk mode: Toggle, then Hold and Toggle again in the Insert menu.
Steps: With Walk mode on Toggle, tap the Walk key (Link walks), open the Insert menu, choose Hold for Walk mode, then Toggle again, and close the menu.
Expected: Choosing Hold clears the toggled walk, as #66 says; Link is not walking without another Walk press.
Actual: Link still walks, with no Walk press.
What changed
Choosing Hold for Walk mode in the Insert menu now clears a toggled walk at once. Switching away from the window still keeps a toggled walk.
host/nn_hid.c):walk_heldclears the toggled walk for Hold first, before the return taken while the menu has the keys. The menu'swas_down = 1is unchanged, so a key held as the menu closes still needs a release. The read made while the window is behind another one calledwalk_held(0, 0, 0), Hold, only to mark the key as held; it now passes the Walk mode, so Alt+Tab keeps a toggled walk as before.tests/test_walk_key.py): Toggle on, the menu opened, a read in Hold and one in Toggle, the menu closed, no Walk press: not walking; the next press walks again. The fixture gets the no-ophos_oot_autoload_inputit needs to link since #399; #497 adds the same line, so whichever lands second drops it.Measurements
Verdict: the new case fails with main's input code and passes here; the walk test now links and passes, with no new suite failures.
Hardware: none used (game-free checks on a Linux x86-64 PC, gcc 15.2, Python 3.14)
Scene: none, the game was not run
Method: 2026-11-14.
python3 -I -B tests/run_all.py, two runs each, interleaved (main, PR, main, PR). The new case also ran with main'shost/nn_hid.c. Branch:fix/walk-hold-in-menu.How to reproduce: the commands above in a checkout of each commit
1be60eaee2057708tests/run_all.py(run 1, run 2)test_bake_portability.py,test_walk_key.py; in run 2 alsotest_oot_state_tap.pytest_bake_portability.pytests/test_walk_key.py, main'snn_hid.ctest_bake_portability.pyfails here for a missing Python module (zstandard).test_oot_state_tap.pyfailed once on main and passed in the other five runs here. On maintest_walk_key.py's fixture doesn't link (undefined reference to hos_oot_autoload_input); here it links and passes.Flags and settings
None.
Testing
Tested: the game-free suite on a Linux PC, as in Measurements.
tests/test_input_background.py(it runs the sameread_input) passes.Not tested: the game with a keyboard.
Must be tested: None.
Risks
What could break: #497 adds the same fixture line.
Turning it off: Reverting the commit puts the reset back below the menu's return.
Compatibility: Choosing Hold in the Insert menu now drops a toggled walk at once, as choosing it in play did.
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
mainand passing here.tests/that reads changed source updated in this PR, not weakened.WIP: fix(input): Walk mode set to Hold in the Insert menu drops a toggled walkto fix(input): Walk mode set to Hold in the Insert menu drops a toggled walkView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.