Skip to content

Commit

Permalink
curses: Add CTRL-N/CTRL-P for next/previous element
Browse files Browse the repository at this point in the history
  • Loading branch information
afh authored and tgraf committed Jan 3, 2018
1 parent ed8528c commit 5677863
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/out_curses.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ enum {
KEY_TOGGLE_DETAILS = 'd',
KEY_TOGGLE_INFO = 'i',
KEY_COLLECT_HISTORY = 'h',
KEY_CTRL_N = 14,
KEY_CTRL_P = 16,
};

#define DETAILS_COLS 40
Expand Down Expand Up @@ -1186,10 +1188,12 @@ static int handle_input(int ch)
return 1;

case KEY_DOWN:
case KEY_CTRL_N:
element_select_next();
return 1;

case KEY_UP:
case KEY_CTRL_P:
element_select_prev();
return 1;

Expand Down

0 comments on commit 5677863

Please sign in to comment.