diff --git a/examples/interactive-demo/src/main.rs b/examples/interactive-demo/src/main.rs index 2dd3105a..ec3967fe 100644 --- a/examples/interactive-demo/src/main.rs +++ b/examples/interactive-demo/src/main.rs @@ -2,6 +2,7 @@ use std::io::{self, Write}; +use crossterm::event::KeyEventKind; pub use crossterm::{ cursor, event::{self, Event, KeyCode, KeyEvent}, @@ -61,7 +62,10 @@ where '3' => test::attribute::run(w)?, '4' => test::event::run(w)?, '5' => test::synchronized_output::run(w)?, - 'q' => break, + 'q' => { + execute!(w, cursor::SetCursorStyle::DefaultUserShape).unwrap(); + break; + } _ => {} }; } @@ -80,7 +84,9 @@ pub fn read_char() -> Result { loop { if let Ok(Event::Key(KeyEvent { code: KeyCode::Char(c), - .. + kind: KeyEventKind::Press, + modifiers: _, + state: _, })) = event::read() { return Ok(c);