Skip to content

v0.0.9

Pre-release
Pre-release
Compare
Choose a tag to compare
@rhysd rhysd released this 09 Mar 16:55
· 38 commits to main since this release
  • BREAKING: Merge KeybindDispatcher into Keybinds. Now Keybinds directly has dispatch method and dispatches actions. This change makes the API simpler. Note that setting different timeout values to compared objects makes == operator return false even if the key bindings are completely equal.
  • BREAKING: Rewrite KeySeq using smallvec. Now it is a struct instead of enum and it no longer allows accessing the internal state.
    • Key sequences containing up to 2 key inputs can be allocated on stack instead of heap (previously only a single key input could be allocated on stack).
    • KeySeq now implements Hash trait.
    • Methods for adding inputs to a key sequence were implemented.
  • BREAKING: Replace Key::F(u8) variant with Key::F1...Key::F35 variants. This change brings the following benefits.
    • The size of Key was reduced from 8 bytes to 4 bytes because u8 value required a 3 bytes padding.
    • Invalid keys such as Key::F(0) or Key::F(99) are now not possible.
  • Implement Extend for Keybinds to append multiple key bindings.
  • Fix crossterm's button release event is not ignored as Key::Ignored.
  • Fix an empty key sequence does not cause an error on serialization.
  • Explain the crate features in Cargo.toml.