From 4b22eda3678d816abd1ce644b3ad166ef91ac472 Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 4 Aug 2008 06:24:11 +0000 Subject: [PATCH] (fully_initialize): Add more aliaese (e.g. C-M-1 vs. C-A-1). --- src/input.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/input.c b/src/input.c index adc6728..5554299 100644 --- a/src/input.c +++ b/src/input.c @@ -403,14 +403,36 @@ fully_initialize () } buf3[0] = 255; - alias[0] = alias[5] = msymbol (buf3); + alias[0] = alias[3] = msymbol (buf3); alias[1] = one_char_symbol[255] = msymbol ("M-Delete"); alias[2] = msymbol ("A-Delete"); - alias[3] = msymbol ("C-M-?"); - alias[4] = msymbol ("C-A-?"); - for (j = 0; j < 5; j++) + for (j = 0; j < 3; j++) msymbol_put (alias[j], M_key_alias, alias[j + 1]); + /* Aliases for keys that can't be mapped to one-char-symbol + (e.g. C-A-1) */ + /* buf is already set to "C-?-". */ + for (i = ' '; i <= '~'; i++) + { + if (i == '@') + { + i = '_'; + continue; + } + if (i == 'a') + { + i = 'z'; + continue; + } + buf[2] = 'M'; + buf[4] = i; + alias[0] = alias[2] = msymbol (buf); + buf[2] = 'A'; + alias[1] = msymbol (buf); + for (j = 0; j < 2; j++) + msymbol_put (alias[j], M_key_alias, alias[j + 1]); + } + Minput_method = msymbol ("input-method"); Mtitle = msymbol ("title"); Mmacro = msymbol ("macro"); -- 1.7.10.4