mirror of
https://github.com/crossterm-rs/crossterm.git
synced 2025-09-28 13:31:23 +00:00
Fix code and remove example
This commit is contained in:
parent
11160d11a0
commit
aa34a95591
@ -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);
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user