WIP: feat(input): separate keyboard actions and binding pages #613
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 @ 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!613
Loading…
Reference in a new issue
No description provided.
Delete branch "TheDevil/Longshot:feat/keyboard-actions-bindings"
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: feat · Risk: medium · Tested on: Windows llvm-mingw renderer build and game-free fixtures · Needs: fresh in-game input/controller validation and Linux build
Why
Keyboard players need interaction, sprint and roll on separate bindings without changing controller A. Separate keyboard and controller pages also make those choices understandable. This is the input-only replacement for the corresponding portion of #173. See #180 for keyboard prompts and #185 for the related concern about keeping keyboard/controller input independent.
What changed
An opt-in PC keyboard mode separates sprint hold, sprint toggle and roll from the ordinary A/interact binding. The controller continues to use the game's original A action path and its existing binding/toggle settings.
host/pc_controls.c,nx2/oot_pc_controls.py: all three input instructions validated together before hooking; keyboard state, roll edge/buffer, toggle cancellation and both controller A binding slots. Unsupported sites stop the lift instead of applying a partial hook.gpu/vk/vk_menu.cpp: separate Keyboard & Mouse and Controller bindings pages, immediate custom-action binding, independent resets, retained Walk/ocarina controls, and keyboard labels over the native HUD D-pad.gpu/vk/vk_api.h: API 23, preserving main's API-22 text-input callback and adding the shared action record, physical-pad sampling and a game-thread menu observer. Option 61 is separate from existing option IDs.Measurements
Verdict: the input producer, binding navigation, focus, ocarina, native menu and overlay-order fixtures pass; the NGX-enabled Windows Vulkan renderer links. No current-revision in-game latency/performance result is claimed.
Before: main @
2b1d38c682After: this PR @
92e8eba875Hardware: Windows x64, i7-14700F, 16 GB RAM; GPU/driver not exercised by the game-free fixtures.
Scene: authored option/clock/input fixtures; no gameplay rendered for this revision.
How to reproduce: run
python -I -B tests/run_all.pywith the official llvm-mingw compiler on PATH; focused commands are listed under Testing.Method: game-free production-code fixtures with fake keys/pads/guest memory; native renderer compilation without a game.
2b1d38c692e8eba8Follow-up extracted audio/stick fixtures pass with the new PC field, and checks for the explicit
pc_controlssave key and persistence passed after the full run. Renderer rebuilt after the final key mapping, zero compile failures.Flags and settings
PC mode is off by default. This PR adds no environment switches.
Testing
Tested: Windows full suite, focused production-code fixtures and NGX-enabled Vulkan renderer link. Checks cover both controller A binding slots, held/edge input, roll buffers, focus/menu cancellation, key conflicts, independent binding-page resets, controller toggle navigation, ocarina note rows, existing menu mouse behavior and HUD-only overlay recording.
git diff --checkpasses.Baseline failures reproduced on main:
tests/test_appimage_player_build.py,tests/test_cpm_discovery.py,tests/test_crash_dialog.py,tests/test_env_on.py,tests/test_finish_output.py,tests/test_lift_cleanup_error.py,tests/test_linux_preflight.py,tests/test_make_game_cache.py,tests/test_oot_state_tap.py,tests/test_readback_late.py,tests/test_tested_configurations.py,tests/test_vk_pgo.py,tests/test_vram_budget_row.py,tests/test_walk_key.py.Not tested: this split revision in a running game, physical gamepads, Linux host/renderer build, unusual mouse buttons/layouts and long play sessions. Earlier combined-install results are not substituted for a fresh run of this API-23 slice. The user's installed game was not changed.
Must be tested:
Risks
What could break: guest instruction assumptions, input-device transitions, buffered roll and persistence of custom bindings; a mismatched host/renderer is not compatible. Mouse/menu/HUD focus needs a fresh live check after this rebase.
Turning it off: PC keyboard controls Off restores native action behavior. Reverting this commit removes the optional controls and pages.
Compatibility: saves and shader/pipeline cache formats do not change. New ini keys are optional. API advances 22 to 23: rebuild host and renderer together; main's text input remains present. Builder/lift includes the new instruction-checked module; no game assets or executable patches are distributed.
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
Assisted-by:trailer.docs/tested/fragment: pending; WIP.Upstream refresh
Current head:
04fa541dc8ccbaf29b089b5058a541de4436827a. Main snapshot6c9edffeis incorporated by merge, preserving published history. 10 focused checks passed after the merge; zero failures/skips. Earlier full-suite measurements remain tied to their named feature commits above. The literal rebase checklist remains unticked because history was merged, not rewritten. Fresh game/Linux checks remain WIP.Aligned the description with the current template and named fixture results. Pending in-game/Linux validation remains explicit and the PR stays WIP.
Updated the branch to include main @
6c9edffeby non-rewriting merge. Current head04fa541dc8; 10 focused post-merge checks passed, 0 failed/skipped. Description preserves commit-specific full-suite results and remaining live/Linux validation. Still WIP.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.