Skip to content

Commit

Permalink
Changed exit key from ESC to END & added cfg_attr to disable terminal…
Browse files Browse the repository at this point in the history
… opening on Windows
  • Loading branch information
Snoupix committed Mar 9, 2023
1 parent 8a99715 commit 3f8097f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use std::sync::{Arc, Mutex};
use std::thread::sleep;
use std::time::Duration;
Expand Down Expand Up @@ -149,7 +150,7 @@ fn callback(event: Event, state: &mut Arc<Mutex<State>>) {
let mut state = state.lock().unwrap();

if let EventType::KeyRelease(key) = event.event_type {
if key == Key::Escape {
if key == Key::End {
state.shutdown = true;
return;
}
Expand Down

0 comments on commit 3f8097f

Please sign in to comment.