Skip to content

dev: Custom keybinds & better input support#11

Merged
philiplinden merged 2 commits into
mainfrom
dev-2025-08-28
Aug 29, 2025
Merged

dev: Custom keybinds & better input support#11
philiplinden merged 2 commits into
mainfrom
dev-2025-08-28

Conversation

@philiplinden

Copy link
Copy Markdown
Owner

Highlights

  • Custom keybinds support
  • Capital letters and other shift- accessible characters are now properly inserted into the input buffer
  • Refactored the context handler to mimic Bevy Ratatui in places where I can't use it directly (like managing the RatatuiContext resource)
  • Updated docs and examples

The custom keybinds was a happy accident, really. I started chasing the root cause of the issue with the shift key and the natural solution led to customizeable actions. It's not fully baked, though, and often breaks if you try to get fancy with the mappings.

It is pretty reliable to handle actions outside the REPL by handling bevy keyboard input events in ReplSet::Pre (before the REPL runs and clears the events). I haven't seen how this might interact with other input event systems yet.

Copilot summary

This pull request introduces several improvements and updates across the documentation, configuration, and examples for the Bevy REPL crate. The most significant changes are the addition of customizable keybinds, enhanced documentation for key event handling and logging, and updates to example organization and dependencies to support new features. These changes improve usability, clarify advanced configuration options, and make the REPL more flexible for different use cases.

Keybinds and Input Handling:

  • Added support for customizable keybinds for all REPL controls, with documentation on configuring PromptKeymap and handling modifier combinations. This includes a new example (examples/keybinds.rs) and updated docs explaining advanced key mapping and caveats with modifier detection. [1] [2] [3] [4]
  • Documented how crossterm key events are captured, parsed, and cleared by the REPL, including how to wire up systems to read input before REPL processing.

Logging and Output:

  • Clarified logging integration with Bevy's LogPlugin and Ratatui, including instructions for routing log output to the REPL renderer and when to disable the default logger. [1] [2]
  • Updated dependencies to enable trace-level logging and improved error reporting via color-eyre.

Examples and Configuration:

  • Reorganized and expanded the list of example applications in Cargo.toml to showcase new features and better demonstrate configuration options.
  • Updated example code to use DefaultPlugins where appropriate and removed unnecessary plugin inclusions for clarity and consistency. [1] [2] [3]

Documentation and Known Issues:

  • Revised documentation on aspirations, feature completeness, and known limitations, including platform-specific notes and advanced keybind caveats. [1] [2]
  • Improved index and navigation in documentation to reflect new keybind information.

These changes collectively make the REPL more configurable, better documented, and easier to integrate with custom workflows and TUI contexts.

@github-actions

Copy link
Copy Markdown

Changelog

See GitHub Releases and the Bevy REPL Book for details.

0.3.1 - 2025-08-29

📚 Documentation

🧪 Experimental

  • Context refactor and better keybinds (dd28099)
  • Custom keybinds and cleaner examples (2209b9d)
  • Add placeholders for help (4354571)
  • Remove scrollreadyset, always stdout (bed7d47)
  • Move stdout behind feature flag (a6460bc)
  • Make context mgmt better (8b0db88)
  • Remove pretty stuff (ce50975)

⚙️ Repository

  • (docs) Build mdBook on PR, deploy only on tags using mdBook action (2e090cd)
  • Use the real github action for pages (06030f1)
  • Deploy the book on every push to main (c4589a2)
  • Make the book on every push to main (563574c)
  • Enable changelog generation (82832ca)
📜 Full Changelog

Changelog

See GitHub Releases and the Bevy REPL Book for details.

[0.3.0] - 2025-08-14

📚 Documentation

🐛 Bug Fixes

  • Disable the changelog for now (ca1d368)
  • Clean up examples (3f6f234)
  • Bad plugin setup (a1ebbe2)
  • Close and quit were misconfigured (df104b1)
  • Remove broken cmds that need world access (19aca25)

🧪 Experimental

  • Disable changelog on main for now (9b02990)
  • Demo (a1ff6b3)
  • Custom log layer (bd50098)
  • Pretty renderer is working (3cd37cd)
  • Repl println macro (a7bb78f)
  • Lots of examples and ergonomic renderer settings (7e3cbee)
  • Custom renderer (ca17531)
  • Even more examples (e70cf98)
  • Overhaul (d0bbea2)
  • Works with windowed apps too! (955262b)
  • Built-in commands, derive, and examples (a781f21)
  • Add more examples (d455679)
  • Command parsing works!!!! (a7edc34)
  • Buffer text input and backspace (d9df188)
  • Custom ratatui context (fc6bba4)
  • Drop bevy_crossterm and use bevy_ratatui (60231d1)
  • Bevy_crossterm and simplify (2c8295e)
  • Switch from rustyline to crossterm (3bda182)
  • Tweaking the derive macros (ad8421b)
  • Cleanup (b331b52)
  • Derive (2ed17bc)
  • More advanced patterns (4df61ee)
  • More designing through the readme (0f7432b)
  • Add rustyline, write out design docs (fd4ea0f)

New Contributors ❤️

@philiplinden
philiplinden merged commit 82a332e into main Aug 29, 2025
3 of 4 checks passed
@philiplinden
philiplinden deleted the dev-2025-08-28 branch August 29, 2025 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant