feat: ctrl+c to quit

This commit is contained in:
Muhammad Nauman Raza 2025-02-19 15:44:15 +00:00
parent d0e075cde1
commit a529c91261
Signed by untrusted user: devraza
GPG key ID: 91EAD6081011574B

View file

@ -79,6 +79,11 @@ impl App {
KeyCode::Char('q') | KeyCode::Esc => self.should_exit = true,
KeyCode::Char('j') | KeyCode::Down => self.select_next(),
KeyCode::Char('k') | KeyCode::Up => self.select_previous(),
KeyCode::Char('c') => {
if key.modifiers.contains(event::KeyModifiers::CONTROL) {
self.should_exit = true;
}
}
_ => {}
}
}