[GH-ISSUE #7134] Creative inventory: search-tab numeric swaps ignore rebound hotbar and offhand keys #3150

Closed
opened 2026-11-03 04:06:14 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @masa-masa-0314 on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7134

Originally assigned to: @masa-masa-0314 on GitHub.

🤖 Filed by masa-masa-0314's AI agent (ZCode, GPT-6), not by masa-masa-0314 personally.

On main at 185ebe0a68bae59b78c3fa91fa97aa02235f71a3, the creative inventory search tab treats physical digits 1–9 as fixed hotbar targets instead of consulting the current controls.

Reproduction

  1. Bind Hotbar Slot 1 to the main-keyboard 0 key.
  2. Open the creative inventory's search tab.
  3. With an empty cursor stack, hover a populated item slot.
  4. Press 0, then try the now-unbound 1 key.

Expected in vanilla 26.3: 0 swaps the hovered item into hotbar slot 1; 1 is available as search input.

Current dispatch: 0 does not swap; 1 still swaps to slot 1. Numeric keypad bindings and a swap-offhand binding on a numeric key have the same missing binding lookup.

Evidence and scope

Game::search_tab_hotbar_key checks HOTBAR_DIGITS.contains(&code) and passes the physical code directly to inventory_hotkey. Vanilla CreativeModeInventoryScreen.keyPressed first gates on InputConstants.Key.getNumericKeyValue().isPresent(), then calls AbstractContainerScreen.checkHotbarKeyPressed, which checks the configured offhand binding first and then the configured hotbar bindings.

Independently inspected those methods in the installed 26.3 client jar using javap -c -p. A temporary Rust fixture extracting the actual function and using real KeyBinds reproduces seven failing regression groups in the old implementation. This is isolated dispatch evidence, not an in-game GUI reproduction.

This was found while investigating #6892, but is a separate defect: vanilla's creative search tab does not dispatch a Tab-bound swap before the search box. This issue does not ask to change that behavior.

Originally created by @masa-masa-0314 on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7134 Originally assigned to: @masa-masa-0314 on GitHub. > 🤖 Filed by masa-masa-0314's AI agent (ZCode, GPT-6), not by masa-masa-0314 personally. On main at `185ebe0a68bae59b78c3fa91fa97aa02235f71a3`, the creative inventory search tab treats physical digits 1–9 as fixed hotbar targets instead of consulting the current controls. ## Reproduction 1. Bind Hotbar Slot 1 to the main-keyboard `0` key. 2. Open the creative inventory's search tab. 3. With an empty cursor stack, hover a populated item slot. 4. Press `0`, then try the now-unbound `1` key. Expected in vanilla 26.3: `0` swaps the hovered item into hotbar slot 1; `1` is available as search input. Current dispatch: `0` does not swap; `1` still swaps to slot 1. Numeric keypad bindings and a swap-offhand binding on a numeric key have the same missing binding lookup. ## Evidence and scope `Game::search_tab_hotbar_key` checks `HOTBAR_DIGITS.contains(&code)` and passes the physical code directly to `inventory_hotkey`. Vanilla `CreativeModeInventoryScreen.keyPressed` first gates on `InputConstants.Key.getNumericKeyValue().isPresent()`, then calls `AbstractContainerScreen.checkHotbarKeyPressed`, which checks the configured offhand binding first and then the configured hotbar bindings. Independently inspected those methods in the installed 26.3 client jar using `javap -c -p`. A temporary Rust fixture extracting the actual function and using real `KeyBinds` reproduces seven failing regression groups in the old implementation. This is isolated dispatch evidence, not an in-game GUI reproduction. This was found while investigating #6892, but is a separate defect: vanilla's creative search tab does not dispatch a Tab-bound swap before the search box. This issue does not ask to change that behavior.
Author
Owner

@masa-masa-0314 commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

Written by masa-masa-0314's AI agent (ZCode, GPT-6), not by masa-masa-0314 personally. I have a small local fix that resolves the current numeric binding before dispatching the creative-search swap. Validation compares the original and repaired dispatch with the real KeyBinds implementation; details will be in the PR.

<!-- gh-comment-id:6576000687 --> @masa-masa-0314 commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim Written by masa-masa-0314's AI agent (ZCode, GPT-6), not by masa-masa-0314 personally. I have a small local fix that resolves the current numeric binding before dispatching the creative-search swap. Validation compares the original and repaired dispatch with the real KeyBinds implementation; details will be in the PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3150
No description provided.