Fix code and remove example

This commit is contained in:
Timon 2023-04-08 16:20:06 +02:00
parent 11160d11a0
commit aa34a95591
2 changed files with 1 additions and 17 deletions

View File

@ -1,17 +0,0 @@
//! Demonstrates how to match on modifiers like: Control, alt, shift.
//!
//! cargo run --example event-poll-read
use std::{io, time::Duration};
use crossterm::{
cursor::position,
event::{poll, read, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
execute,
terminal::{disable_raw_mode, enable_raw_mode},
};
pub fn main() {
crossterm::terminal::enable_raw_mode().unwrap();
let result = crossterm::event::read();
eprintln!("RESULT: {:?}", result);
}

View File

@ -271,6 +271,7 @@ fn parse_csi_keyboard_enhancement_flags(buffer: &[u8]) -> io::Result<Option<Inte
if bits & 1 != 0 {
flags |= KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES;
}
#[cfg(feature = "event-kind")]
if bits & 2 != 0 {
flags |= KeyboardEnhancementFlags::REPORT_EVENT_TYPES;
}