minus icon indicating copy to clipboard operation
minus copied to clipboard

Introduce native input matching definition

Open AMythicDev opened this issue 3 years ago • 0 comments

This set of changes will allow minus to define key, mouse and resize events to be declared natively through minus's APIs and not requiring end applications to interact with the underlying crossterm crate.

This means that keybindings like Ctrl+L can be declared into minus like this

pager.add_input_event(KeyBind("c-l", |pagerstate| {
     ...
}));

Note: Do note that this is not the final implementation and there will be large variations between this and the actual implementation that comes-up.

This has the advantage that end-applications can now add to, modify, or remove minus's default event binding without needing to copy the entire matcher function and then change the parts that they want.

This new API will not deprecate the previous way of defining input binding so existing code will work without any breakage.

AMythicDev avatar May 04 '22 19:05 AMythicDev