index : nmrs-tui
A fast, Vim-friendly NetworkManager TUI built in Rust.
about summary refs log tree commit diff

Diffstat (limited to 'src/events.rs')

-rw-r--r-- src/events.rs 6
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/events.rs b/src/events.rs
index cda2025..a942934 100644
--- a/src/events.rs
+++ b/src/events.rs
@@ -1,4 +1,4 @@
use crossterm::event::{KeyCode, KeyEvent};
use crossterm::event::{KeyCode, KeyEvent, KeyEventKind};
use nmrs::{SettingsPatch, WifiSecurity};

use crate::{
@@ -8,6 +8,10 @@
};

pub async fn handle_events(app: &mut App, key: KeyEvent) -> anyhow::Result<()> {
    if key.kind != KeyEventKind::Press {
        return Ok(());
    }

    match app.focus {
        Focus::Tab(tab) => Ok(handle_tabs(app, key, tab).await?),
        Focus::Popup(popup) => Ok(handle_popups(app, key, popup).await?),