Releases: rhysd/keybinds-rs
Releases · rhysd/keybinds-rs
v0.2.0
v0.1.1
v0.1.0
The first stable release 🎉
- BREAKING: Remove
Key::Backtabbecause it is actually not mapped to a single key. crossterm'sBackTabkey 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
vimexample to demonstrate how to use this crate for modal key bindings. - Add
Keybinds::ongoing_inputsto get the key inputs matching to some key bindings. - Add
Key::Helpvariant. - Fix parsing
NumLockkey.
v0.0.9
- BREAKING: Merge
KeybindDispatcherintoKeybinds. NowKeybindsdirectly hasdispatchmethod and dispatches actions. This change makes the API simpler. Note that setting different timeout values to compared objects makes==operator returnfalseeven if the key bindings are completely equal. - BREAKING: Rewrite
KeySequsing 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).
KeySeqnow implementsHashtrait.- Methods for adding inputs to a key sequence were implemented.
- BREAKING: Replace
Key::F(u8)variant withKey::F1...Key::F35variants. This change brings the following benefits.- The size of
Keywas reduced from 8 bytes to 4 bytes becauseu8value required a 3 bytes padding. - Invalid keys such as
Key::F(0)orKey::F(99)are now not possible.
- The size of
- Implement
ExtendforKeybindsto 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
- BREAKING:
KeyInput::newnow takesInto<Mods>instead ofMods. - BREAKING: Implement
FromIterator<Keybind>forKeybindsinstead ofKeybindDispatcher. - Add API documents to all the APIs. Read it on docs.rs.
- Add
KeybindDispatcher::into_keybinds. - Add
Keybinds::take_dispatchermethod. - Add the support for F21~F35 keys by iced and winit.
v0.0.7
- Support iced as optional
icedfeature. (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
- Support serializing key bindings with serde crate.
serdefeature needs to be enabled. (example) - Support structural fuzzing with arbitrary crate.
arbitraryfeature needs to be enabled. (example) - Implement
Displaytrait forKey,Mod,KeyInput, andKeySeq. - Improve an error message on Shift modifier with unnamed keys.
v0.0.5
- BREAKING: Make some
newconstructor functions intoFrom::fromtrait implementations with more generic arguments usingIntotrait. - BREAKING: Avoid heap allocation on a single-key key binding by changing
KeySeqstruct to an enum. - BREAKING: Rename
KeySeq::matchestoKeySeq::match_to. - BREAKING: Hide
KeyInput's fields and add getter methodsKeyInput::key,KeyInput::mods. - Add support for
Shiftmodifier again.Shiftmodifier key is only available with named keys likeShift+Up. For example, when you want to define key binding for Shift + A, you need to useAinstead ofShift+a. This restriction is for avoiding some confusing edge cases and may be relaxed in the future. - Make fields of
Keybindstruct public. - Fix error handling on parsing invalid empty key bindings.
- Fix non-ASCII spaces like
U+3000are not available for key binding. - Define the key binding syntax in the separate document.
v0.0.4
- BREAKING: Use logical keys instead of physical keys. Now the characters in key sequence are case-sensitive. For example, logical key
Ameans typing "A" and "Shift" physical keys and it is distinguished froma(only typing "A"). Along with this change,Shiftmodifier key was removed. - BREAKING: Rename
KeybindDispatcher::triggertoKeybindDispatcher::dispatch. - Implement
FromIterator<Keybind<A>>forKeybindDispatcher<A>to constructor a dispatcher instance from a list of key bindings easily. - Implement
Deref<Target=[KeyBind]>forKeybindsand implementKeybindDispatcher::keybindsgetter method. - Add API document for all optional features.
- Add
minimalandserdeexamples.
v0.0.3: rename key bindings API
- BREAKING: Key bindings API was renamed.
KeyBindMatcher→KeybindDispatcherKeyBinds→KeybindsKeyBind→Keybind
- BREAKING: Some methods were renamed.
KeybindDispatcher::timeout→KeybindDispatcher::set_timeout
- Support termwiz as optional
termwizfeature. - Allow modifiers in upper case like
CTRL. - Implement
KeybindDispatcher::bindandKeybindDispatcher::addmethods for easily defining key bindings.