helix icon indicating copy to clipboard operation
helix copied to clipboard

Don't panic if we get an unexpected key code

Open groves opened this issue 3 years ago • 1 comments

It seems like we get media play/pause/mute/etc keys despite not emitting DISAMBIGUATE_ESCAPE_CODES(#4125).

Make crossterm::event::KeyCode a TryInto for KeyCode instead of Into to let us ignore keys we don't care about.

groves avatar Nov 03 '22 09:11 groves

Rather than turning this into a try_from, why not add all these events to the internal event struct and properly handle them (or ignore them inside the editor)? That way we don't have to deal with intricacies of enabling DISAMBIGUATE_ESCAPE_CODES in a backwards-compatible way (i.e. not calling it on terminals with no support), but if we do get these events then they're at least handled.

archseer avatar Nov 04 '22 10:11 archseer