use crossterm::event::{KeyCode, KeyEvent};
use crate::app::App;
pub fn handle_key(app: &mut App, key: KeyEvent) {
match key.code {
KeyCode::Esc | KeyCode::Char('O') => {
app.show_options_panel = false;
}
KeyCode::Char('T') | KeyCode::Char('t') => {
app.show_options_panel = false;
app.show_theme_panel = true;
}
KeyCode::Char(',') => {
app.show_options_panel = false;
app.open_settings_in_editor();
}
_ => {}
}
}