/* Determine the shortcut key corresponding to the values of kbinput
* (the key itself), meta_key (whether the key is a meta sequence), and
* func_key (whether the key is a function key), if any. In the
- * process, convert certain non-shortcut keys used by e.g. Pico's file
- * browser into their corresponding shortcut keys. */
+ * process, convert certain non-shortcut keys into their corresponding
+ * shortcut keys. */
void parse_browser_input(int *kbinput, bool *meta_key, bool *func_key)
{
get_shortcut(browser_list, kbinput, meta_key, func_key);
#ifndef NANO_TINY
const char *nano_mark_msg = N_("Mark text at the cursor position");
const char *nano_whereis_next_msg = N_("Repeat last search");
+ const char *nano_copy_msg =
+ N_("Copy the current line and store it in the cutbuffer");
#endif
const char *nano_forward_msg = N_("Move forward one character");
const char *nano_back_msg = N_("Move back one character");
const char *nano_tab_msg =
N_("Insert a tab character at the cursor position");
const char *nano_enter_msg =
- N_("Insert a new line at the cursor position");
+ N_("Insert a newline at the cursor position");
const char *nano_delete_msg =
N_("Delete the character under the cursor");
const char *nano_backspace_msg =
#ifndef NANO_TINY
const char *nano_wordcount_msg =
N_("Count the number of words, lines, and characters");
- const char *nano_copy_msg =
- N_("Copy the current line and store it in the cutbuffer");
#endif
const char *nano_refresh_msg =
N_("Refresh (redraw) the current screen");
sc_init_one(&main_list, NANO_NO_KEY, whereis_next_msg,
IFHELP(nano_whereis_next_msg, TRUE), NANO_WHEREIS_NEXT_KEY,
NANO_WHEREIS_NEXT_FKEY, NANO_NO_KEY, VIEW, do_research);
+
+ sc_init_one(&main_list, NANO_NO_KEY, N_("Copy Text"),
+ IFHELP(nano_copy_msg, TRUE), NANO_COPY_KEY, NANO_NO_KEY,
+ NANO_COPY_ALTKEY, NOVIEW, do_copy_text);
#endif
sc_init_one(&main_list, NANO_FORWARD_KEY, N_("Forward"),
sc_init_one(&main_list, NANO_NO_KEY, N_("Word Count"),
IFHELP(nano_wordcount_msg, FALSE), NANO_WORDCOUNT_KEY,
NANO_NO_KEY, NANO_NO_KEY, VIEW, do_wordlinechar_count);
-
- sc_init_one(&main_list, NANO_NO_KEY, N_("Copy Text"),
- IFHELP(nano_copy_msg, FALSE), NANO_COPY_KEY, NANO_NO_KEY,
- NANO_COPY_ALTKEY, NOVIEW, do_copy_text);
#endif
sc_init_one(&main_list, NANO_REFRESH_KEY, refresh_msg
/* Determine the shortcut key corresponding to the values of kbinput
* (the key itself), meta_key (whether the key is a meta sequence), and
* func_key (whether the key is a function key), if any. In the
- * process, convert certain non-shortcut keys used by e.g. Pico's help
- * browser into their corresponding shortcut keys. */
+ * process, convert certain non-shortcut keys into their corresponding
+ * shortcut keys. */
void parse_help_input(int *kbinput, bool *meta_key, bool *func_key)
{
get_shortcut(help_list, kbinput, meta_key, func_key);
- /* Pico compatibility. */
if (*meta_key == FALSE && *func_key == FALSE) {
switch (*kbinput) {
+ /* For consistency with the file browser. */
+ case ' ':
+ *kbinput = NANO_NEXTPAGE_KEY;
+ break;
+ case '-':
+ *kbinput = NANO_PREVPAGE_KEY;
+ break;
/* Cancel is equivalent to Exit here. */
case NANO_CANCEL_KEY:
*kbinput = NANO_EXIT_KEY;