commit 5f0a58b055a70808216037213282da63ea0b4b46
parent df4536559282282d75787aade511e43b5803c572
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Fri, 21 Apr 2006 02:24:34 +0000
add missing alternate meta key sequences
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3407 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
3 files changed, 29 insertions(+), 18 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -74,10 +74,10 @@ CVS code -
- In the main shortcut list, move the "Refresh" shortcut down to
after the "Enter" shortcut, for consistency. (DLR)
- Add the ability to go to the first and last line of the
- current file from the main list via Meta-/ and Meta-\. Also,
- make sure all the equivalent shortcuts in the search, replace,
- and "Go To Line" lists accept both the meta keys and the
- equivalent function keys. (DLR)
+ current file from the main list via Meta-/ (Meta-?) and Meta-\
+ (Meta-|). Also, make sure all the equivalent shortcuts in the
+ search, replace, and "Go To Line" lists accept both the meta
+ keys and the equivalent function keys. (DLR)
toggle_init()
- In the global toggle list, move the "Constant cursor position
display" toggle up to after the "Use more space for editing"
diff --git a/src/global.c b/src/global.c
@@ -652,11 +652,11 @@ void shortcut_init(bool unjustify)
sc_init_one(&main_list, NANO_NO_KEY, first_line_msg,
IFHELP(nano_firstline_msg, NANO_FIRSTLINE_ALTKEY), NANO_NO_KEY,
- NANO_NO_KEY, VIEW, do_first_line);
+ NANO_FIRSTLINE_ALTKEY2, VIEW, do_first_line);
sc_init_one(&main_list, NANO_NO_KEY, last_line_msg,
IFHELP(nano_lastline_msg, NANO_LASTLINE_ALTKEY), NANO_NO_KEY,
- NANO_NO_KEY, VIEW, do_last_line);
+ NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
#ifdef ENABLE_MULTIBUFFER
sc_init_one(&main_list, NANO_NO_KEY, N_("Previous File"),
@@ -717,11 +717,12 @@ void shortcut_init(bool unjustify)
sc_init_one(&whereis_list, NANO_FIRSTLINE_KEY, first_line_msg,
IFHELP(nano_firstline_msg, NANO_FIRSTLINE_ALTKEY),
- NANO_FIRSTLINE_FKEY, NANO_NO_KEY, VIEW, do_first_line);
+ NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
+ do_first_line);
sc_init_one(&whereis_list, NANO_LASTLINE_KEY, last_line_msg,
IFHELP(nano_lastline_msg, NANO_LASTLINE_ALTKEY),
- NANO_LASTLINE_FKEY, NANO_NO_KEY, VIEW, do_last_line);
+ NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
sc_init_one(&whereis_list, NANO_TOOTHERSEARCH_KEY, replace_msg,
IFHELP(nano_replace_msg, NANO_NO_KEY), NANO_REPLACE_FKEY,
@@ -791,11 +792,12 @@ void shortcut_init(bool unjustify)
sc_init_one(&replace_list, NANO_FIRSTLINE_KEY, first_line_msg,
IFHELP(nano_firstline_msg, NANO_FIRSTLINE_ALTKEY),
- NANO_FIRSTLINE_FKEY, NANO_NO_KEY, VIEW, do_first_line);
+ NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
+ do_first_line);
sc_init_one(&replace_list, NANO_LASTLINE_KEY, last_line_msg,
IFHELP(nano_lastline_msg, NANO_LASTLINE_ALTKEY),
- NANO_LASTLINE_FKEY, NANO_NO_KEY, VIEW, do_last_line);
+ NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
/* TRANSLATORS: Try to keep this at most 12 characters. */
sc_init_one(&replace_list, NANO_TOOTHERSEARCH_KEY, N_("No Replace"),
@@ -846,11 +848,12 @@ void shortcut_init(bool unjustify)
sc_init_one(&replace_list_2, NANO_FIRSTLINE_KEY, first_line_msg,
IFHELP(nano_firstline_msg, NANO_FIRSTLINE_ALTKEY),
- NANO_FIRSTLINE_FKEY, NANO_NO_KEY, VIEW, do_first_line);
+ NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
+ do_first_line);
sc_init_one(&replace_list_2, NANO_LASTLINE_KEY, last_line_msg,
IFHELP(nano_lastline_msg, NANO_LASTLINE_ALTKEY),
- NANO_LASTLINE_FKEY, NANO_NO_KEY, VIEW, do_last_line);
+ NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
#ifndef NANO_TINY
sc_init_one(&replace_list_2, NANO_PREVLINE_KEY, history_msg,
@@ -876,11 +879,12 @@ void shortcut_init(bool unjustify)
sc_init_one(&gotoline_list, NANO_FIRSTLINE_KEY, first_line_msg,
IFHELP(nano_firstline_msg, NANO_FIRSTLINE_ALTKEY),
- NANO_FIRSTLINE_FKEY, NANO_NO_KEY, VIEW, do_first_line);
+ NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
+ do_first_line);
sc_init_one(&gotoline_list, NANO_LASTLINE_KEY, last_line_msg,
IFHELP(nano_lastline_msg, NANO_LASTLINE_ALTKEY),
- NANO_LASTLINE_FKEY, NANO_NO_KEY, VIEW, do_last_line);
+ NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
sc_init_one(&gotoline_list, NANO_TOOTHERWHEREIS_KEY,
N_("Go To Text"), IFHELP(nano_whereis_msg, NANO_NO_KEY),
@@ -1123,11 +1127,12 @@ void shortcut_init(bool unjustify)
sc_init_one(&whereis_file_list, NANO_FIRSTFILE_KEY, first_file_msg,
IFHELP(nano_firstfile_msg, NANO_FIRSTFILE_ALTKEY),
- NANO_FIRSTFILE_FKEY, NANO_NO_KEY, VIEW, do_first_file);
+ NANO_FIRSTFILE_FKEY, NANO_FIRSTFILE_ALTKEY2, VIEW,
+ do_first_file);
sc_init_one(&whereis_file_list, NANO_LASTFILE_KEY, last_file_msg,
IFHELP(nano_lastfile_msg, NANO_LASTFILE_ALTKEY),
- NANO_LASTFILE_FKEY, NANO_NO_KEY, VIEW, do_last_file);
+ NANO_LASTFILE_FKEY, NANO_LASTFILE_ALTKEY2, VIEW, do_last_file);
#ifndef NANO_SMALL
sc_init_one(&whereis_file_list, NANO_NO_KEY, case_sens_msg,
diff --git a/src/nano.h b/src/nano.h
@@ -420,9 +420,10 @@ typedef struct rcoption {
#define NANO_ALT_LCARAT '<'
#define NANO_ALT_EQUALS '='
#define NANO_ALT_RCARAT '>'
+#define NANO_ALT_QUESTION '?'
#define NANO_ALT_BACKSLASH '\\'
#define NANO_ALT_RBRACKET ']'
-#define NANO_ALT_USCORE '_'
+#define NANO_ALT_UNDERSCORE '_'
#define NANO_ALT_A 'a'
#define NANO_ALT_B 'b'
#define NANO_ALT_C 'c'
@@ -449,6 +450,7 @@ typedef struct rcoption {
#define NANO_ALT_X 'x'
#define NANO_ALT_Y 'y'
#define NANO_ALT_Z 'z'
+#define NANO_ALT_PIPE '|'
/* Some semi-changeable keybindings; don't play with these unless you're
* sure you know what you're doing. Assume ERR is defined as -1. */
@@ -498,15 +500,19 @@ typedef struct rcoption {
#define NANO_FIRSTLINE_KEY NANO_PREVPAGE_KEY
#define NANO_FIRSTLINE_FKEY NANO_PREVPAGE_FKEY
#define NANO_FIRSTLINE_ALTKEY NANO_ALT_SLASH
+#define NANO_FIRSTLINE_ALTKEY2 NANO_ALT_QUESTION
#define NANO_FIRSTFILE_KEY NANO_FIRSTLINE_KEY
#define NANO_FIRSTFILE_FKEY NANO_FIRSTLINE_FKEY
#define NANO_FIRSTFILE_ALTKEY NANO_FIRSTLINE_ALTKEY
+#define NANO_FIRSTFILE_ALTKEY2 NANO_FIRSTLINE_ALTKEY2
#define NANO_LASTLINE_KEY NANO_NEXTPAGE_KEY
#define NANO_LASTLINE_FKEY NANO_NEXTPAGE_FKEY
#define NANO_LASTLINE_ALTKEY NANO_ALT_BACKSLASH
+#define NANO_LASTLINE_ALTKEY2 NANO_ALT_PIPE
#define NANO_LASTFILE_KEY NANO_LASTLINE_KEY
#define NANO_LASTFILE_FKEY NANO_LASTLINE_FKEY
#define NANO_LASTFILE_ALTKEY NANO_LASTLINE_ALTKEY
+#define NANO_LASTFILE_ALTKEY2 NANO_LASTLINE_MISCKEY
#define NANO_REFRESH_KEY NANO_CONTROL_L
#define NANO_JUSTIFY_KEY NANO_CONTROL_J
#define NANO_JUSTIFY_FKEY KEY_F(4)
@@ -539,7 +545,7 @@ typedef struct rcoption {
#define NANO_WORDCOUNT_KEY NANO_ALT_D
#define NANO_SCROLLUP_KEY NANO_ALT_MINUS
#define NANO_SCROLLDOWN_KEY NANO_ALT_PLUS
-#define NANO_SCROLLUP_ALTKEY NANO_ALT_USCORE
+#define NANO_SCROLLUP_ALTKEY NANO_ALT_UNDERSCORE
#define NANO_SCROLLDOWN_ALTKEY NANO_ALT_EQUALS
#define NANO_CUTTILLEND_KEY NANO_CONTROL_X
#define NANO_CUTTILLEND_ALTKEY NANO_ALT_T