mirror of
https://github.com/crossterm-rs/crossterm.git
synced 2025-09-27 21:14:17 +00:00
Upgrade to bitflags 2
This commit is contained in:
parent
a2c9350ff2
commit
d4238511c0
@ -36,7 +36,7 @@ events = ["mio", "signal-hook", "signal-hook-mio"]
|
||||
# Shared dependencies
|
||||
#
|
||||
[dependencies]
|
||||
bitflags = "1.3"
|
||||
bitflags = "2.1"
|
||||
parking_lot = "0.12"
|
||||
|
||||
# optional deps only added when requested
|
||||
|
@ -251,6 +251,7 @@ bitflags! {
|
||||
///
|
||||
/// Alternate keys and Unicode codepoints are not yet supported by crossterm.
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, PartialOrd, PartialEq, Eq, Clone, Copy, Hash)]
|
||||
pub struct KeyboardEnhancementFlags: u8 {
|
||||
/// Represent Escape and modified keys using CSI-u sequences, so they can be unambiguously
|
||||
/// read.
|
||||
@ -598,6 +599,7 @@ bitflags! {
|
||||
/// [`KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES`] has been enabled with
|
||||
/// [`PushKeyboardEnhancementFlags`].
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, PartialOrd, PartialEq, Eq, Clone, Copy, Hash)]
|
||||
pub struct KeyModifiers: u8 {
|
||||
const SHIFT = 0b0000_0001;
|
||||
const CONTROL = 0b0000_0010;
|
||||
@ -625,6 +627,7 @@ bitflags! {
|
||||
/// [`KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES`] has been enabled with
|
||||
/// [`PushKeyboardEnhancementFlags`].
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, PartialOrd, PartialEq, Eq, Clone, Copy, Hash)]
|
||||
pub struct KeyEventState: u8 {
|
||||
/// The key event origins from the keypad.
|
||||
const KEYPAD = 0b0000_0001;
|
||||
|
Loading…
x
Reference in New Issue
Block a user