crossterm-rs / crossterm

Cross platform terminal library rust
MIT License
3.28k stars 281 forks source link

Support bitflags version 2 #770

Closed dzfrias closed 1 year ago

dzfrias commented 1 year ago

Is your feature request related to a problem? Please describe. Bitflags v2 provides a ton of conveniences for types implementing Bitflags. Currently, both the KeyModifiers and KeyboardEnhancementFlags types use the bitflags! macro. It would be nice to use version 2 so their APIs get access to the new features.

This includes a few breaking changes, so there a couple ways to handle it.

Let me know if you want me to submit a PR for any of the options!

Describe the solution you'd like Use Bitflags v2 for the KeyModifiers and KeyboardEnhancementFlags types. This would require an increment of the minor version of this crate.

Describe alternatives you've considered if any Either to not go through with this change or gate it with a feature flag.