[PR #5308] [MERGED] fix(input): Shift and Ctrl inventory shortcuts (#4166) #6198

Closed
opened 2026-11-03 06:15:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5308
Author: @loicpiller
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/4166-inventory-crafting-shortcuts


📝 Commits (5)

  • 4f1c3ce fix(inventory): distribute carried stacks during Shift drags
  • f014dd1 fix(input): reconcile screen modifiers without releasing other bindings
  • da36881 fix(input): keep synthesized Shift clicks and agent releases on the modifier word
  • 54ded42 fix(input): read Ctrl+Q and agent releases from the same modifier state
  • 8fa56fc Merge main into #5308 (#5208 landed beside it)

📊 Changes

8 files changed (+738 additions, -54 deletions)

View changed files

📝 crates/horizon-client-input/src/lib.rs (+1 -0)
➕ crates/horizon-client-input/src/modifiers.rs (+232 -0)
📝 crates/horizon-client/src/game.rs (+76 -29)
📝 crates/horizon-client/src/game/control.rs (+73 -6)
📝 crates/horizon-client/src/game/pad.rs (+7 -0)
📝 crates/horizon-client/src/game/pad_menu.rs (+12 -9)
📝 crates/horizon-client/src/game/station_control.rs (+13 -6)
📝 tools/lan_e2e.py (+324 -4)

📄 Description

🤖 Opened by loicpiller's AI agent (OpenAI Codex gpt-6.1-sol, then Claude Code Opus 5.5), not by loicpiller personally.

Fixes #4166: inventory and crafting shortcuts that depend on Shift and Ctrl.

What changes for players

  • Shift-drag with a carried stack distributes it across the slots, as in vanilla.
  • A lost Shift/Ctrl release (alt-tab, OS shortcut) no longer turns every following inventory click into a quick move. Screens read the OS modifier word (InputWithModifiers.hasShiftDown/hasControlDown). Sneak, sprint, rebound keys, controller holds and toggles are kept.
  • Controller Y quick-moves again in the survival and creative inventories.
  • Ctrl+Q reads Ctrl from that same modifier word, in a menu and in play.

Agent control

  • key <mod> tap|up always releases the modifier, even when a dialog, the sign editor or a missing world stops the command early.
  • release also releases sneak and sprint pressed through key, and clears the modifier word.
  • station … shift clicks quick-move again.

Commits

  1. fix(inventory): distribute carried stacks during Shift drags
  2. fix(input): reconcile screen modifiers without releasing other bindings
  3. fix(input): keep synthesized Shift clicks and agent releases on the modifier word
  4. fix(input): read Ctrl+Q and agent releases from the same modifier state

New LAN checks: shift-double-click, recipe-shift, shift-drag, modifier-release.

Self-check

Run on macOS arm64 on main 9069aea3e, without prepared resources:

  • cargo test --locked -p horizon-client-input --lib: 64 passed
  • cargo test --locked -p horizon-client --bin horizon-client: 376 passed, 3 ignored
  • cargo clippy --locked -p horizon-client-input -p horizon-client --lib --bins --tests -- -D warnings -A unreachable-patterns: passed (the allowed lint is main's duplicate S::Attack arm in lan/hub.rs, a file this PR does not touch)
  • cargo fmt --all --check, tools/check_public_tree.py: passed

Not run yet (needs .local/): python3 tools/pr_ready.py and
python3 tools/lan_e2e.py --check modifier-release --check clicks --check shift-double-click --check recipe-shift --check shift-drag --check crafting --check wheel.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/5308 **Author:** [@loicpiller](https://github.com/loicpiller) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/4166-inventory-crafting-shortcuts` --- ### 📝 Commits (5) - [`4f1c3ce`](https://github.com/horizon-rust/horizon/commit/4f1c3ce532b0a167490eabfb064e8ffc8ace2577) fix(inventory): distribute carried stacks during Shift drags - [`f014dd1`](https://github.com/horizon-rust/horizon/commit/f014dd11eda0d8d96c55a6ed310a59f9bf88d9c1) fix(input): reconcile screen modifiers without releasing other bindings - [`da36881`](https://github.com/horizon-rust/horizon/commit/da36881cc78e6d813610f7ba20412bb1a6f84de8) fix(input): keep synthesized Shift clicks and agent releases on the modifier word - [`54ded42`](https://github.com/horizon-rust/horizon/commit/54ded421ce0714a6aca52f13e911d651fd050383) fix(input): read Ctrl+Q and agent releases from the same modifier state - [`8fa56fc`](https://github.com/horizon-rust/horizon/commit/8fa56fc67ae8a4a3b0b8e21c364253d4abc1661a) Merge main into #5308 (#5208 landed beside it) ### 📊 Changes **8 files changed** (+738 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-input/src/lib.rs` (+1 -0) ➕ `crates/horizon-client-input/src/modifiers.rs` (+232 -0) 📝 `crates/horizon-client/src/game.rs` (+76 -29) 📝 `crates/horizon-client/src/game/control.rs` (+73 -6) 📝 `crates/horizon-client/src/game/pad.rs` (+7 -0) 📝 `crates/horizon-client/src/game/pad_menu.rs` (+12 -9) 📝 `crates/horizon-client/src/game/station_control.rs` (+13 -6) 📝 `tools/lan_e2e.py` (+324 -4) </details> ### 📄 Description > 🤖 Opened by loicpiller's AI agent (OpenAI Codex gpt-6.1-sol, then Claude Code Opus 5.5), not by loicpiller personally. Fixes #4166: inventory and crafting shortcuts that depend on Shift and Ctrl. ## What changes for players - Shift-drag with a carried stack distributes it across the slots, as in vanilla. - A lost Shift/Ctrl release (alt-tab, OS shortcut) no longer turns every following inventory click into a quick move. Screens read the OS modifier word (`InputWithModifiers.hasShiftDown/hasControlDown`). Sneak, sprint, rebound keys, controller holds and toggles are kept. - Controller Y quick-moves again in the survival and creative inventories. - Ctrl+Q reads Ctrl from that same modifier word, in a menu and in play. ## Agent control - `key <mod> tap|up` always releases the modifier, even when a dialog, the sign editor or a missing world stops the command early. - `release` also releases sneak and sprint pressed through `key`, and clears the modifier word. - `station … shift` clicks quick-move again. ## Commits 1. `fix(inventory): distribute carried stacks during Shift drags` 2. `fix(input): reconcile screen modifiers without releasing other bindings` 3. `fix(input): keep synthesized Shift clicks and agent releases on the modifier word` 4. `fix(input): read Ctrl+Q and agent releases from the same modifier state` New LAN checks: `shift-double-click`, `recipe-shift`, `shift-drag`, `modifier-release`. ## Self-check Run on macOS arm64 on main 9069aea3e, without prepared resources: - `cargo test --locked -p horizon-client-input --lib`: 64 passed - `cargo test --locked -p horizon-client --bin horizon-client`: 376 passed, 3 ignored - `cargo clippy --locked -p horizon-client-input -p horizon-client --lib --bins --tests -- -D warnings -A unreachable-patterns`: passed (the allowed lint is main's duplicate `S::Attack` arm in `lan/hub.rs`, a file this PR does not touch) - `cargo fmt --all --check`, `tools/check_public_tree.py`: passed Not run yet (needs `.local/`): `python3 tools/pr_ready.py` and `python3 tools/lan_e2e.py --check modifier-release --check clicks --check shift-double-click --check recipe-shift --check shift-drag --check crafting --check wheel`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:15:47 +07:00
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#6198
No description provided.