ulyssa / modalkit

A Rust library for building modal editing applications
Apache License 2.0
49 stars 5 forks source link

Always produce an action after reading a complete key sequence #58

Closed ulyssa closed 1 year ago

ulyssa commented 1 year ago

I initially made it so that ModalMachine allowed Step::step to not produce any actions, primarily for input sequences that transitioned between modes. I think that this is the right way for Step::step to work, but while working on #57 , I realized that it makes it hard for anything outside to tell when a full, meaningful key sequence has been entered. I'm going to change it so that if no actions are generated by Step::step or ModeKeys::unmapped, then a Default one is instead.