AMythicDev / minus

An asynchronous, runtime data feedable terminal paging library for Rust
https://crates.io/crates/minus/
Apache License 2.0
321 stars 23 forks source link

Add InputHandler trait, to allow client code to define custom keybindings #33

Closed rezural closed 3 years ago

rezural commented 3 years ago

Add InputHandler trait which is settable on the pager struct, via set_input_handler(input_handler: Box)

Also add a DefaultInputHandler which handles input according to minus default, which is used by default.

The code which handles the internal minus Events, remains unchanged.

AMythicDev commented 3 years ago

I was thinking of something implementing something like this in minus. Thanks for working on it