Preserve upstream defaults and existing settings. Include the supplied screenshot, settings regression checks, and the native tool pins and split control-target support needed to validate this renderer integration. Co-Authored-By: Codex <[email protected]>
Keystrokes (Horizon native mod)
Horizon's official Keystrokes: your movement keys, mouse buttons and space bar in a corner, lit while held, with clicks per second. Its settings page (Options > Mods > Keystrokes > Settings) picks the corner and the clicks per second.
It is a horizon-mixins bundle (mixins/keystrokes/) that the Horizon
launcher builds into the game. It keeps the settings of earlier versions: the same files (horizon-mods/.horizon-mod-data/keystrokes/corner, cps).
Install
In the Horizon launcher: Mods → Keystrokes → Install, then Build on the same page (once built, switch it on or off in the game under Options → Mods). The launcher downloads its own Rust and builds the game with your native mods; see Horizon's native mods.
Made on the hook points
The bundle hooks only Horizon's native hook points (crates/horizon-client/src/game/native_hooks.rs), which keep
their names and signatures across releases. compatibility.json names the version it needs ("hooks": 1), so the
launcher builds Keystrokes on any Horizon with that version or a later one, the player's own game by default, together with any other
mod. horizon_revision is only the commit it was last tested on.
| File | What it is |
|---|---|
mixins/keystrokes/horizon-mixin.toml |
The bundle: one module and the HEAD hooks |
mixins/keystrokes/runtime.rs |
The mod's logic and state, added to the game as game::official_keystrokes; also this crate's library, for its tests |
mixins/keystrokes/*.rs |
One small helper per hook |
../tools/native.py |
Shared by the native mods: apply on Horizon (from GitHub, by commit), check, build, package the .hnmod, run the proof |
proof.py (with ../tools/game.py) |
The proof: the built game driven with horizon-ctl --offscreen on fresh, temporary data |
Build and prove
(cd native/keystrokes && cargo test) # the logic
python3 native/tools/native.py check keystrokes # apply on the tested Horizon and cargo check the game
python3 native/tools/native.py check keystrokes --horizon latest # ... on the newest Nightly
python3 native/tools/native.py check all # with the other native mods, as a player's set
python3 native/tools/native.py package keystrokes # native/target/keystrokes-<version>.hnmod for the registry
python3 native/tools/native.py proof keystrokes --resources /path/to/.local/horizon-client/26.3
The proof needs resources prepared from your own Minecraft 26.3 (horizon-prepare); none are in this repository.
It seeds an earlier version's settings (bottom right, no clicks per second) in a temporary game folder, then checks that Options > Mods shows them, and that the Corner button moves the keys to the top left and writes the same file. CI runs cargo test, packages the .hnmod and checks the game on the tested commit, and every Monday on the newest Nightly.
License: MIT.