The Insert menu's Controls page: rebind the gamepad and the keyboard #350
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!350
Loading…
Reference in a new issue
No description provided.
Delete branch "input/controls-page"
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?
Part of splitting #83 into small PRs. Depends on #343 (and through it on #335): this branch is built on them, so its first two commits are theirs. Only the last one is new here.
Until now the controls could only be changed by editing
hookshot_options.ini(#335). The Insert menu now has a Controls row that opens a page listing each Switch button with its gamepad input and its keys.hookshot_options.iniwith the options.bindingandbind(host/nn_hid.c; API version 3).[ ] \ 'become keys too (VK_OEM_4 to VK_OEM_7), so they can be bound.Binding A to the pad's top button: the page waits for it, then shows it. X, which had the top button, takes A's old right button:
Binding A's key to G:
Delete clears A's gamepad input; Reset to defaults puts everything back:
Tested on Linux (game built from this branch, a virtual Xbox 360 pad through uinput, and the keyboard):
pad_a=3andpad_x=1after the swap,key_a=71,pad_a=-1after Delete, andpad_a=1andkey_a=69after Reset.tests/gives the same result as on main (the 4test_cpp_preflightchecks need Visual Studio).🤖 Generated with Claude Code
Similar to #372 btw
look at the base pr of that (#83)
@NotRexed rebased on current main (
9e8fb5b). It sits on the rebased #343.