Skip to content

Commit 42e1b92

Browse files
author
cht
committed
use 1 2 3 to change tabs
1 parent ea21b99 commit 42e1b92

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/informations/state.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ pub fn information_state(timeout: Duration) -> io::Result<IFEXIT> {
77
if let Event::Key(key) = event::read()? {
88
match key.code {
99
KeyCode::Char('q') => return Ok(crate::state::IFEXIT::Exit),
10-
KeyCode::Char('t') => return Ok(crate::state::IFEXIT::Change(Page::SubScribe)),
10+
KeyCode::Char('t') | KeyCode::Char('1') => {
11+
return Ok(crate::state::IFEXIT::Change(Page::SubScribe))
12+
}
1113
_ => return Ok(IFEXIT::Next),
1214
}
1315
}

src/subscribe/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub(crate) fn subscribe_state(app: &mut AppSub) -> io::Result<IFEXIT> {
2323
app.show_popup = true;
2424
app.input_mode = InputMode::Popup;
2525
}
26-
KeyCode::Char('t') => {
26+
KeyCode::Char('t') | KeyCode::Char('2') => {
2727
return Ok(IFEXIT::Change(Page::Information));
2828
}
2929

0 commit comments

Comments
 (0)