diff -ur nano-cvs/src/global.c nano-new/src/global.c --- nano-cvs/src/global.c 2007-10-29 16:38:37.000000000 +0100 +++ nano-new/src/global.c 2008-01-14 19:29:38.000000000 +0100 @@ -599,12 +599,12 @@ NANO_NO_KEY, VIEW, do_left); #ifndef NANO_TINY - sc_init_one(&main_list, NANO_NEXTWORD_KEY, N_("Next Word"), + sc_init_one(&main_list, CONTROL_RIGHT, N_("Next Word"), IFSCHELP(nano_nextword_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, VIEW, do_next_word_void); - sc_init_one(&main_list, NANO_NO_KEY, N_("Prev Word"), - IFSCHELP(nano_prevword_msg, FALSE, NANO_PREVWORD_KEY), + sc_init_one(&main_list, CONTROL_LEFT, N_("Prev Word"), + IFSCHELP(nano_prevword_msg, FALSE, NANO_NO_KEY), NANO_NO_KEY, NANO_NO_KEY, VIEW, do_prev_word_void); #endif @@ -625,11 +625,11 @@ NANO_NO_KEY, VIEW, do_end); #ifndef DISABLE_JUSTIFY - sc_init_one(&main_list, NANO_NO_KEY, beg_of_par_msg, + sc_init_one(&main_list, CONTROL_UP, beg_of_par_msg, IFSCHELP(nano_parabegin_msg, FALSE, NANO_PARABEGIN_METAKEY), NANO_NO_KEY, NANO_PARABEGIN_METAKEY2, VIEW, do_para_begin_void); - sc_init_one(&main_list, NANO_NO_KEY, end_of_par_msg, + sc_init_one(&main_list, CONTROL_DOWN, end_of_par_msg, IFSCHELP(nano_paraend_msg, FALSE, NANO_PARAEND_METAKEY), NANO_NO_KEY, NANO_PARAEND_METAKEY2, VIEW, do_para_end_void); #endif diff -ur nano-cvs/src/help.c nano-new/src/help.c --- nano-cvs/src/help.c 2007-10-29 16:38:37.000000000 +0100 +++ nano-new/src/help.c 2008-01-14 19:29:38.000000000 +0100 @@ -442,9 +442,23 @@ entries++; /* Yucky sentinel values that we can't handle a better * way. */ - if (s->ctrlval == NANO_CONTROL_SPACE) { - char *space_ptr = display_string(_("Space"), 0, 14, - FALSE); + if (s->ctrlval == CONTROL_LEFT || s->ctrlval == CONTROL_RIGHT || + s->ctrlval == CONTROL_UP || s->ctrlval == CONTROL_DOWN) { + char *space_ptr; + switch (s->ctrlval) { + case CONTROL_LEFT: + space_ptr = display_string(_("Left"), 0, 14, FALSE); + break; + case CONTROL_RIGHT: + space_ptr = display_string(_("Right"), 0, 14, FALSE); + break; + case CONTROL_UP: + space_ptr = display_string(_("Up"), 0, 14, FALSE); + break; + case CONTROL_DOWN: + space_ptr = display_string(_("Down"), 0, 14, FALSE); + break; + } if (s->funcval == NANO_NO_KEY && (s->metaval == NANO_NO_KEY || s->miscval == NANO_NO_KEY)) { diff -ur nano-cvs/src/nano.c nano-new/src/nano.c --- nano-cvs/src/nano.c 2007-12-19 16:42:15.000000000 +0100 +++ nano-new/src/nano.c 2008-01-14 20:18:41.000000000 +0100 @@ -1426,7 +1426,7 @@ * function key, and it's not a shortcut or toggle, throw it out. */ if (!*s_or_t) { if (is_ascii_cntrl_char(input) || *meta_key || *func_key) { - statusbar(_("Unknown Command")); + statusbar(_("Unknown command key: 0x%x"), input); beep(); *meta_key = FALSE; *func_key = FALSE; diff -ur nano-cvs/src/nano.h nano-new/src/nano.h --- nano-cvs/src/nano.h 2007-12-19 16:42:15.000000000 +0100 +++ nano-new/src/nano.h 2008-01-14 19:30:26.000000000 +0100 @@ -557,6 +557,8 @@ #define NANO_NEXTFILE_METAKEY NANO_META_PERIOD #define NANO_BRACKET_KEY NANO_META_RBRACKET #define NANO_NEXTWORD_KEY NANO_CONTROL_SPACE +#define CONTROL_RIGHT 0x205 +#define CONTROL_LEFT 0x203 #define NANO_PREVWORD_KEY NANO_META_SPACE #define NANO_WORDCOUNT_KEY NANO_META_D #define NANO_SCROLLUP_KEY NANO_META_MINUS @@ -567,6 +569,8 @@ #define NANO_PARABEGIN_KEY NANO_CONTROL_W #define NANO_PARABEGIN_METAKEY NANO_META_LPARENTHESIS #define NANO_PARABEGIN_METAKEY2 NANO_META_9 +#define CONTROL_UP 0x208 +#define CONTROL_DOWN 0x201 #define NANO_PARAEND_KEY NANO_CONTROL_O #define NANO_PARAEND_METAKEY NANO_META_RPARENTHESIS #define NANO_PARAEND_METAKEY2 NANO_META_0 diff -ur nano-cvs/src/prompt.c nano-new/src/prompt.c --- nano-cvs/src/prompt.c 2007-12-18 12:04:59.000000000 +0100 +++ nano-new/src/prompt.c 2008-01-14 19:29:38.000000000 +0100 @@ -100,6 +100,7 @@ NANO_CUT_KEY || #ifndef NANO_TINY input == NANO_NEXTWORD_KEY || + input == CONTROL_LEFT || input == CONTROL_RIGHT || #endif (*meta_key && ( #ifndef NANO_TINY @@ -191,9 +192,13 @@ do_statusbar_left(); break; #ifndef NANO_TINY + case CONTROL_RIGHT: case NANO_NEXTWORD_KEY: do_statusbar_next_word(FALSE); break; + case CONTROL_LEFT: + do_statusbar_prev_word(FALSE); + break; case NANO_PREVWORD_KEY: if (*meta_key) do_statusbar_prev_word(FALSE); diff -ur nano-cvs/src/winio.c nano-new/src/winio.c --- nano-cvs/src/winio.c 2007-12-19 16:42:16.000000000 +0100 +++ nano-new/src/winio.c 2008-01-14 21:21:06.000000000 +0100 @@ -1281,7 +1281,7 @@ /* If we got an unrecognized escape sequence, throw it out. */ if (retval == ERR) { if (win == edit) { - statusbar(_("Unknown Command")); + statusbar(_("Unknown command key element: 0x%x"), seq[seq_len-1]); beep(); } }