ingest: Add macros for ctrl + up/down
I don't think ncurses has macros for these, but the magic numbers I have in there seem to work. So add macros for those that conform to the rest of the ncurses KEY_* naming convention.
This commit is contained in:
parent
a50fa90d02
commit
731b014397
1 changed files with 9 additions and 2 deletions
11
src/ingest.c
11
src/ingest.c
|
|
@ -33,6 +33,13 @@ static int read_cmd_page(const char *home_dir, int idx);
|
|||
static void update_cmd_pg_status(void);
|
||||
static void inter_command_wait(void);
|
||||
|
||||
#ifndef KEY_CUP
|
||||
# define KEY_CUP (566)
|
||||
#endif
|
||||
#ifndef KEY_CDOWN
|
||||
# define KEY_CDOWN (525)
|
||||
#endif
|
||||
|
||||
int
|
||||
ingest_start(bytenuts_t *bytenuts)
|
||||
{
|
||||
|
|
@ -801,10 +808,10 @@ handle_functions(int ch)
|
|||
case KEY_SEND: /* go to front of log */
|
||||
cheerios_gofwd(-1);
|
||||
return 1;
|
||||
case 566: /* ctrl + up arrow */
|
||||
case KEY_CUP: /* ctrl + up arrow */
|
||||
cheerios_goback(1);
|
||||
return 1;
|
||||
case 525: /* ctrl + down arrow */
|
||||
case KEY_CDOWN: /* ctrl + down arrow */
|
||||
cheerios_gofwd(1);
|
||||
return 1;
|
||||
case KEY_RESIZE:
|
||||
|
|
|
|||
Loading…
Reference in a new issue