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