Skip to content

Commit

Permalink
Merge pull request #11 from arnarpall/add-vim-bindings
Browse files Browse the repository at this point in the history
Add vim bindings for navigation
  • Loading branch information
jfernandez authored Feb 27, 2024
2 parents 40184fb + 42598e7 commit 11ac6e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use ratatui::{symbols, Frame, Terminal};
mod app;
mod bpf_program;

const TABLE_FOOTER: &str = "(q) quit | (↑) move up | (↓) move down | (↵) show graphs";
const TABLE_FOOTER: &str = "(q) quit | (↑,k) move up | (↓,j) move down | (↵) show graphs";
const GRAPHS_FOOTER: &str = "(q) quit | (↵) show program list";
const HEADER_COLS: [&str; 7] = [
"ID",
Expand Down Expand Up @@ -118,12 +118,12 @@ fn run_draw_loop<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> Result
if poll(Duration::from_millis(50))? {
if let Event::Key(key) = event::read()? {
match key.code {
KeyCode::Down => {
KeyCode::Down | KeyCode::Char('j')=> {
if !app.show_graphs {
app.next_program()
}
}
KeyCode::Up => {
KeyCode::Up | KeyCode::Char('k') => {
if !app.show_graphs {
app.previous_program()
}
Expand Down

0 comments on commit 11ac6e3

Please sign in to comment.