gitkraft-tui 0.6.5

GitKraft — Git IDE terminal application (Ratatui TUI)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crossterm::event::{KeyCode, KeyEvent};

use crate::app::App;

/// Handle key events when the options panel is visible.
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') => {
            // Switch to theme panel
            app.show_options_panel = false;
            app.show_theme_panel = true;
        }
        _ => {}
    }
}