Skip to content

Releases: rhysd/keybinds-rs

v0.2.0

26 May 13:29
Compare
Choose a tag to compare
  • BREAKING: Upgrade dependencies
    • bitflags v2.9.0
    • crossterm v0.29.0 (#1)
  • Fix warnings in minimal and vim examples

v0.1.1

21 Mar 09:57
Compare
Choose a tag to compare
  • Handle keypad keys and application keys from termwiz's key events.
  • Add Key::ZoomToggle key.
  • Fix ZoomIn and ZoomOut keys are not converted while handling iced and winit key events.

v0.1.0

16 Mar 15:24
Compare
Choose a tag to compare

The first stable release 🎉

  • BREAKING: Remove Key::Backtab because it is actually not mapped to a single key. crossterm's BackTab key is now correctly mapped to Shift + Tab.
  • Define the minimum supported Rust version is 1.80.0.
  • Clarify the versioning of this crate in documents.
  • Add the contribution guide.
  • Add the vim example to demonstrate how to use this crate for modal key bindings.
  • Add Keybinds::ongoing_inputs to get the key inputs matching to some key bindings.
  • Add Key::Help variant.
  • Fix parsing NumLock key.

v0.0.9

09 Mar 16:55
Compare
Choose a tag to compare
v0.0.9 Pre-release
Pre-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.

v0.0.8

06 Mar 16:11
Compare
Choose a tag to compare
v0.0.8 Pre-release
Pre-release
  • BREAKING: KeyInput::new now takes Into<Mods> instead of Mods.
  • BREAKING: Implement FromIterator<Keybind> for Keybinds instead of KeybindDispatcher.
  • Add API documents to all the APIs. Read it on docs.rs.
  • Add KeybindDispatcher::into_keybinds.
  • Add Keybinds::take_dispatcher method.
  • Add the support for F21~F35 keys by iced and winit.

v0.0.7

25 Feb 16:14
Compare
Choose a tag to compare
v0.0.7 Pre-release
Pre-release
  • Support iced as optional iced feature. (example)
  • Fix Shift modifier is not converted correctly from platform-specific events.
  • Fix Meta modifier key is wrongly handled as Cmd key on converting crossterm events.
  • Scrape examples on generating API documents for docs.rs.
  • Add the fuzz tests.
  • Refine the crossterm example with more practical usage.

v0.0.6

22 Feb 18:02
Compare
Choose a tag to compare
v0.0.6 Pre-release
Pre-release
  • Support serializing key bindings with serde crate. serde feature needs to be enabled. (example)
  • Support structural fuzzing with arbitrary crate. arbitrary feature needs to be enabled. (example)
  • Implement Display trait for Key, Mod, KeyInput, and KeySeq.
  • Improve an error message on Shift modifier with unnamed keys.

v0.0.5

22 Feb 06:16
Compare
Choose a tag to compare
v0.0.5 Pre-release
Pre-release
  • BREAKING: Make some new constructor functions into From::from trait implementations with more generic arguments using Into trait.
  • BREAKING: Avoid heap allocation on a single-key key binding by changing KeySeq struct to an enum.
  • BREAKING: Rename KeySeq::matches to KeySeq::match_to.
  • BREAKING: Hide KeyInput's fields and add getter methods KeyInput::key, KeyInput::mods.
  • Add support for Shift modifier again. Shift modifier key is only available with named keys like Shift+Up. For example, when you want to define key binding for Shift + A, you need to use A instead of Shift+a. This restriction is for avoiding some confusing edge cases and may be relaxed in the future.
  • Make fields of Keybind struct public.
  • Fix error handling on parsing invalid empty key bindings.
  • Fix non-ASCII spaces like U+3000 are not available for key binding.
  • Define the key binding syntax in the separate document.

v0.0.4

19 Feb 02:53
Compare
Choose a tag to compare
v0.0.4 Pre-release
Pre-release
  • BREAKING: Use logical keys instead of physical keys. Now the characters in key sequence are case-sensitive. For example, logical key A means typing "A" and "Shift" physical keys and it is distinguished from a (only typing "A"). Along with this change, Shift modifier key was removed.
  • BREAKING: Rename KeybindDispatcher::trigger to KeybindDispatcher::dispatch.
  • Implement FromIterator<Keybind<A>> for KeybindDispatcher<A> to constructor a dispatcher instance from a list of key bindings easily.
  • Implement Deref<Target=[KeyBind]> for Keybinds and implement KeybindDispatcher::keybinds getter method.
  • Add API document for all optional features.
  • Add minimal and serde examples.

v0.0.3: rename key bindings API

17 Feb 16:09
Compare
Choose a tag to compare
Pre-release
  • BREAKING: Key bindings API was renamed.
    • KeyBindMatcherKeybindDispatcher
    • KeyBindsKeybinds
    • KeyBindKeybind
  • BREAKING: Some methods were renamed.
    • KeybindDispatcher::timeoutKeybindDispatcher::set_timeout
  • Support termwiz as optional termwiz feature.
  • Allow modifiers in upper case like CTRL.
  • Implement KeybindDispatcher::bind and KeybindDispatcher::add methods for easily defining key bindings.