[GH-ISSUE #77] [gameplay] Shift quick-move reads remapped keys; clicking outside an inventory doesn't drop the carried stack #20

Closed
opened 2026-11-02 15:35:33 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @ludovic111 on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/77

Found while reviewing #56.

Quick-move uses remapped keys instead of the physical Shift keys. In crates/horizon-client/src/game.rs, the Shift checks for quick-move (around lines 4094, 4187 and 4204 on main 6c1000a3) read self.keys, which holds remapped and toggled keys. With a screen open, a real Left Shift press goes to the sneak toggle mapping, which ignores presses behind screens (keymapping.rs:133-141), and sync_toggle then removes ShiftLeft from self.keys. With toggle-sneak on, Shift-click quick-move can then fail with Left Shift. Vanilla checks the physical keys with hasShiftDown() (AbstractContainerScreen).

Clicking outside the inventory with a carried stack doesn't drop it. Vanilla's slotClicked with slot -999 (THROW) drops the whole carried stack with the left button and one item with the right; Horizon does nothing.

Fix both against vanilla 26.3, with a harness.

Originally created by @ludovic111 on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/77 Found while reviewing #56. **Quick-move uses remapped keys instead of the physical Shift keys.** In `crates/horizon-client/src/game.rs`, the Shift checks for quick-move (around lines 4094, 4187 and 4204 on main `6c1000a3`) read `self.keys`, which holds remapped and toggled keys. With a screen open, a real Left Shift press goes to the sneak toggle mapping, which ignores presses behind screens (`keymapping.rs:133-141`), and `sync_toggle` then removes `ShiftLeft` from `self.keys`. With toggle-sneak on, Shift-click quick-move can then fail with Left Shift. Vanilla checks the physical keys with `hasShiftDown()` (`AbstractContainerScreen`). **Clicking outside the inventory with a carried stack doesn't drop it.** Vanilla's `slotClicked` with slot -999 (THROW) drops the whole carried stack with the left button and one item with the right; Horizon does nothing. Fix both against vanilla 26.3, with a harness.
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#20
No description provided.