Crate crossterm_keybind

Crate crossterm_keybind 

Source
Expand description

This crate help you build tui with keybings config in an easy way. When building a tui application, we need address following topics.

  • Define a set of keybing for some events
  • Capture one/some key bindings and perform one the event
  • Display a prompt of a key bindings
  • Provide a config file and let user to change all or part of it

These topics can be abstract these into KeyBindTrait, and the key binding serialize and deserialize to a config file are solved in this crate.

There still are a lot of trivial works, ahead you and your great ideal to build tui application. This crate also provides derive macro KeyBind to generate the the keyconfig in a supper easy way, you can have a toml key config for your events and allow user to patch part of it.

Re-exports§

pub use struct_patch;
pub use toml;
pub use toml_example;
pub use log;

Modules§

event
A module to read events.

Structs§

KeyBinding
KeyBindings
KeyBindings struct for key bind configure

Enums§

DisplayFormat
Error

Traits§

KeyBindTrait

Derive Macros§

KeyBind