feat(menu): dual keyboard binding columns #2753
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
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
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2753
Loading…
Reference in a new issue
No description provided.
Delete branch "cfw34683:fix/2717-dual-keys-and-live-rupees"
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?
Summary
See #2717 (live rupee editing split into #2814 per review feedback).
Exposes both keyboard binding slots in the Controls UI:
host/nn_hid.c:hos_rebind_controlnow respectsslot(0or1) forHOS_BIND_KEYinstead of overwriting slot0and clearing slot1.gpu/vk/vk_menu_hit.h&gpu/vk/vk_menu.cpp: Split the singleKeyboardcolumn intoInput 1andInput 2underKeyboard(kCtlKeyPrimary,kCtlKeyAlternate), allowing each slot to be bound and cleared independently.tests/test_bound_keys.py,tests/test_menu_hit.cpp,tests/test_menu_keys.py: Updated for the two keyboard columns and added slot1keyboard rebind assertions.docs/user/images/guide/manifest.json&docs/user/images/guide/source-review-2717-keys.md: Updatedreviewed_sourcehashes forsettings-graphics.png.Testing
Tested: Windows 11 x86_64, in-game (
longshot.exe+longshot_vk.dllbuilt from this branch withllvm-mingw).B(sword swing) toK(Keyboard -> Input 1) andU(Keyboard -> Input 2), saved, restarted, and confirmed bothKandUpersisted.KandUswing the sword.Input 2(U) and pressedDelete/Backspace: clearedInput 2while leavingInput 1(K) intact.tests/test_bound_keys.py,tests/test_menu_hit.py,tests/test_menu_i18n.py,tests/test_menu_i18n_count.py, andtests/test_guide_screenshots.py: all passed.Still to test: None.
Measurements
Nothing to measure: Controls UI layout and key-slot binding change only, no rendering or frame-time hot path changed.
Risks
Low risk. Controls INI format (
key_* = A,U) is unchanged, and reverting this PR restores the singleKeyboardcolumn.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.Ready to merge
main, measured again or a comment says why the numbers still hold.Possibly related, for context:
feat(menu,cheats): dual keyboard binding columns and live rupee editingto feat(menu): dual keyboard binding columns and live rupee editingAmazing work! This is exactly what I was hoping for. The dual bindings make ocarina playing on keyboard so much smoother, and live rupee editing is perfect. Thank you so much.
@review
Recommendation: Request changes. A failed wallet lookup can turn a small rupee edit into a permanent loss of currency. The change also combines two unrelated features and has not yet been shown working in the game.
The change exposes both keyboard binding slots and adds live rupee editing with faster quantity steps. It improves access to existing bindings, but the rupee editor needs safer failure handling and in-game validation.
Blocking (1): must change before merging.
game/oot_tools.c:319: A failed wallet lookup is treated as an unupgraded wallet, so an edit can overwrite a larger balance with 99. (more on the line) Do: Return an unavailable result when a required wallet lookup fails and refuse the edit; add a game-free test for failed lookups and each wallet cap.Should fix (2): not blocking, but worth doing before merging.
gpu/vk/vk_menu.cpp:2978: The changed menu source has not received the required user-guide screenshot source review. (more on the line) Do: Compare the affected guide images and instructions with the new menu, recapture if needed, and update the reviewed source record with the comparison.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
@fixcan do L1, L2 and L3.Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven. The author reports game-free checks and Windows compilation, but both in-game scenarios are still listed as untested.
Other systems: The binding format and both-slot gameplay readers already exist. The rupee path writes game data that survives a save; its HUD and reload behavior remain untested. Linux was not reported tested.
Switches: None.
Reviewed:
4359a39469against694ae5820a: Read the repository rules, standards, PR template, diff, commit messages, and the changed inventory and hit-test headers. Read the changed functions and their input, save, menu, and test callers; the full outputs of the larger changed files and tests were truncated, so their unchanged portions were skimmed. Reviewed the guide screenshot maintenance rules and relevant guide text. Tooling's adjacent AGENTS.md was unavailable; docs/review-checklist.md does not exist.; nothing run (a code review).Checked and fine:
Testing: No commands from the project were run, as requested. The author reports six game-free checks and Windows compilation passing; CI is still running.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -316,2 +316,4 @@}static int oot_rupee_cap(Ctx *c) {if (oot_pouch_count(c, "Item_Wallet_Large") > 0) return 500;L1 (blocking): A failed wallet lookup is treated as an unupgraded wallet, so an edit can overwrite a larger balance with 99.
When: If the rupee flag is readable but the pouch manager is unavailable, oot_pouch_count returns -1 for both wallets. With 200 rupees, pressing Right then queues 99, which the next save can retain.
Do: Return an unavailable result when a required wallet lookup fails and refuse the edit; add a game-free test for failed lookups and each wallet cap.
@ -2976,3 +2976,3 @@ui::text_mid(c, c.f.body, 15 * s, rx0 + 20 * s, header_top + 27 * s, ui::kDim, "Button");const char* titles[kCtlReset] = {"Input 1", "Input 2", "Keyboard", "Toggle"};const char* titles[kCtlReset] = {"Input 1", "Input 2", "Input 1", "Input 2", "Toggle"};for (int col = kCtlPrimary; col < kCtlReset; col++) {L3 (blocking): The changed menu source has not received the required user-guide screenshot source review.
When: The guide manifest records an earlier hash for vk_menu.cpp, while this change alters the Controls layout and labels. The recorded source review is therefore stale.
Do: Compare the affected guide images and instructions with the new menu, recapture if needed, and update the reviewed source record with the comparison.
feat(menu): dual keyboard binding columns and live rupee editingto feat(menu): dual keyboard binding columns4359a394692f9801de18@review
Recommendation: Request changes. It conflicts with its base branch: bring it up to date (
@fixor@rebasetry first). (L5) The rupee edit has been split out, and the screenshot source review is present. The remaining keyboard binding feature still needs an in-game run to verify binding, clearing, gameplay, and persistence.The Controls menu exposes both keyboard binding slots independently. This gives players access to an existing second slot, at the cost of a wider controls layout and additional menu logic.
Blocking (1): must change before merging.
@fixor@rebasetry first). (for the author)Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
Since the last review (on
4359a39469)Resolved: L1 (A failed wallet lookup is treated as an unupgraded wallet, so an edit can overwrite a larg…); L2 (The pull request combines two unrelated features despite the repository's one-topic rule.); L3 (The changed menu source has not received the required user-guide screenshot source review.)
Still open: L4 (The dual keyboard binding feature has no reported in-game run.)
New: L5 (It conflicts with its base branch: bring it up to date (
@fixor@rebasetry first).)Also noticed (2; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven: the slot-specific code and tests support the feature, but no in-game result is reported.
Other systems: Keyboard bindings and their existing INI format are affected; gamepad binding columns remain separate. Windows compilation and focused checks are reported, but the description does not report a Linux build or an in-game run.
Switches: None.
Reviewed:
2f9801de18against22d0d20098: Read the pull request diff, repository rules, pull request template, screenshot source review, and relevant binding and menu changes. Skimmed the screenshot manifest and recorded source reviews; did not read all changed code files in full.; nothing run (a code review).Checked and fine:
Testing: No commands from the project were run. The author reports Windows compilation and focused test passes, but lists the in-game keyboard check as still to test.
Overlaps and merge order: Rupee editing was split into #2814.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
2f9801de186c15350731In-game Controls layout screenshot (Y bound to K and U):
6c15350731bd74733536feat(menu): dual keyboard binding columnsto WIP: feat(menu): dual keyboard binding columnsWIP: feat(menu): dual keyboard binding columnsto feat(menu): dual keyboard binding columnsbd74733536b8be18b337Addressed both remaining items in commit
b8be18b3:L5: Rebased onto
origin/main(b40214d2)docs/user/images/guide/manifest.jsonconflict by keepingmain's baseline hashes and updatinggpu/vk/vk_menu.cppandgpu/vk/vk_menu_hit.hSHA-256 digests.tests/test_menu_keys.pywith missingi18n::game_language_choice()andpause_background_nowstubs formain.python -I -B tests/run_all.py --exact tests/test_bound_keys.py tests/test_menu_keys.py tests/test_guide_screenshots.py(3 passed, 0 failed, 0 skipped)tests/test_menu_hit.cpp(PASS: the hit-test over the controls as drawn)python scripts/check_guide_screenshots.py(passed)L4: In-game verification (Windows build from
b8be18b3)b8be18b337b99b1962c9Closing as superseded by
mod-apionmain:host/nn_hid.c(hos_rebind_control) already supports per-slot keyboard rebinding viaHOS_REBIND_ONE_KEY(wired ingame/crates/host-sys/src/bindings.rs).game/mods/menu/src/rows.tsx(BindingRow) already renders two independentKeybindslots (slot 0andslot 1) on Controls → Keyboard (controls_keys), with independent bind, clear, conflict prompts, and reset.gpu/vk/vk_menu.cpp/gpu/vk/vk_menu_hit.hno longer exists.Pull request closed