[PR #6153] [MERGED] Command block, block editors and debug options: Ctrl and Shift work in their text fields #6682

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6153
Author: @xFedeT
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/ctrl-word-navigation


📝 Commits (1)

  • 77ede7f Command block, structure/jigsaw block editors and debug options read Shift and Ctrl from the live modifiers

📊 Changes

4 files changed (+9 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/game/block_editor.rs (+3 -3)
📝 crates/horizon-client/src/game/command_blocks.rs (+2 -2)
📝 crates/horizon-client/src/game/debug_options.rs (+3 -4)
📝 crates/horizon-client/src/game/lan_screen.rs (+1 -1)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

Fixes #6092

What was wrong

EditBox already handles Ctrl+Left/Right (word by word), Ctrl+Backspace/Delete and Shift selection, given the ctrl and shift flags. The command block, the structure/jigsaw block editor and the debug options screen got those flags from self.keys, a set that only gameplay and the chat fill. In those screens both flags were always false, so word navigation and Shift selection did nothing (the issue's "also applies to command blocks"). Dialogs and chat read the live modifiers and already worked.

What changes

game/{command_blocks,block_editor,debug_options,lan_screen}.rs: ctrl is has_control_down_with_quirk() (the edit modifier: Cmd on macOS, Ctrl elsewhere, as InputWithModifiers.hasControlDownWithQuirk) and shift is has_shift_down(), both from the live modifiers.

Verification

Builds; cargo test -p horizon-client --bins passes. Not tried with a real keyboard (this machine runs the game offscreen): the flags are the same ones dialogs and the chat feed to the same EditBox::key, which already implements the word movement.

Not done

Other text fields were not audited beyond the callers of EditBox::key that read self.keys.

🤖 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/6153 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/ctrl-word-navigation` --- ### 📝 Commits (1) - [`77ede7f`](https://github.com/horizon-rust/horizon/commit/77ede7fc60abd9ce9266fd77ea032203e9f66323) Command block, structure/jigsaw block editors and debug options read Shift and Ctrl from the live modifiers ### 📊 Changes **4 files changed** (+9 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/block_editor.rs` (+3 -3) 📝 `crates/horizon-client/src/game/command_blocks.rs` (+2 -2) 📝 `crates/horizon-client/src/game/debug_options.rs` (+3 -4) 📝 `crates/horizon-client/src/game/lan_screen.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Fixes #6092 ## What was wrong `EditBox` already handles Ctrl+Left/Right (word by word), Ctrl+Backspace/Delete and Shift selection, given the `ctrl` and `shift` flags. The command block, the structure/jigsaw block editor and the debug options screen got those flags from `self.keys`, a set that only gameplay and the chat fill. In those screens both flags were always false, so word navigation and Shift selection did nothing (the issue's "also applies to command blocks"). Dialogs and chat read the live modifiers and already worked. ## What changes `game/{command_blocks,block_editor,debug_options,lan_screen}.rs`: `ctrl` is `has_control_down_with_quirk()` (the edit modifier: Cmd on macOS, Ctrl elsewhere, as `InputWithModifiers.hasControlDownWithQuirk`) and `shift` is `has_shift_down()`, both from the live modifiers. ## Verification Builds; `cargo test -p horizon-client --bins` passes. Not tried with a real keyboard (this machine runs the game offscreen): the flags are the same ones dialogs and the chat feed to the same `EditBox::key`, which already implements the word movement. ## Not done Other text fields were not audited beyond the callers of `EditBox::key` that read `self.keys`. 🤖 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:24:53 +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#6682
No description provided.