[PR #477] [MERGED] Keep held keys held through wait on the control socket #2591

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

📋 Pull Request Information

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

Base: main ← Head: fix/ctl-wait-keeps-held-keys


📝 Commits (1)

  • fc59063 Keep held keys held through wait on the control socket

📊 Changes

3 files changed (+27 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/bin/horizon-ctl/commands.rs (+5 -2)
📝 crates/horizon-client/src/game/agent.rs (+21 -2)
📝 docs/agent-control.md (+1 -1)

📄 Description

Fixes #469

What

horizon-ctl key w down then wait N only moved the player for the first wait: wait ended with release_agent_keys like every other task, so the key was released when it finished. A wait holds nothing, so it now leaves keys and mouse buttons alone. They stay held until key ... up, release or stop. move, goto, jump, break and the other actions still release the movement keys when they end (nothing in tools/ or docs/ relied on wait releasing).

Docs: horizon-ctl key/wait help (which feeds the MCP tool descriptions and --help), the agent command list in the game, and docs/agent-control.md say how holding works.

How tested

Offscreen game on a flat stone platform, z from 0.5, key w down:

step before after
wait 40 z 9.74 z 9.74
wait 20 (key still down) z 9.78 (released, +0.04) z 14.49 (+4.75)
key w up, wait 20 9.78 z 14.96 (coasting), then still after another wait 20
  • cargo fmt, cargo clippy --workspace --all-targets -- -D warnings: clean
  • cargo test -p horizon-client: 742 + 47 + 15 + 2 + 2 + 2 passed (new test only_wait_keeps_held_input)
  • tools/parity.py --changed origin/main: 15 passed, 0 failed

🤖 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/477 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/ctl-wait-keeps-held-keys` --- ### 📝 Commits (1) - [`fc59063`](https://github.com/horizon-rust/horizon/commit/fc59063ada4d23efba361be65937e497f64df1e5) Keep held keys held through wait on the control socket ### 📊 Changes **3 files changed** (+27 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/bin/horizon-ctl/commands.rs` (+5 -2) 📝 `crates/horizon-client/src/game/agent.rs` (+21 -2) 📝 `docs/agent-control.md` (+1 -1) </details> ### 📄 Description Fixes #469 ## What `horizon-ctl key w down` then `wait N` only moved the player for the first wait: `wait` ended with `release_agent_keys` like every other task, so the key was released when it finished. A wait holds nothing, so it now leaves keys and mouse buttons alone. They stay held until `key ... up`, `release` or `stop`. `move`, `goto`, `jump`, `break` and the other actions still release the movement keys when they end (nothing in tools/ or docs/ relied on `wait` releasing). Docs: `horizon-ctl` `key`/`wait` help (which feeds the MCP tool descriptions and `--help`), the agent command list in the game, and docs/agent-control.md say how holding works. ## How tested Offscreen game on a flat stone platform, z from 0.5, `key w down`: | step | before | after | |---|---|---| | `wait 40` | z 9.74 | z 9.74 | | `wait 20` (key still down) | z 9.78 (released, +0.04) | z 14.49 (+4.75) | | `key w up`, `wait 20` | 9.78 | z 14.96 (coasting), then still after another `wait 20` | - `cargo fmt`, `cargo clippy --workspace --all-targets -- -D warnings`: clean - `cargo test -p horizon-client`: 742 + 47 + 15 + 2 + 2 + 2 passed (new test `only_wait_keeps_held_input`) - `tools/parity.py --changed origin/main`: 15 passed, 0 failed 🤖 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-02 15:57:27 +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#2591
No description provided.