aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorStefan Monnier2007-10-09 05:05:39 +0000
committerStefan Monnier2007-10-09 05:05:39 +0000
commit4f4a84ec801ea0d62d32a1b5679def1e16d3f813 (patch)
tree86e671367bcef6d2b42e0a3ae0e1a83c32659f50 /doc/misc
parentbeb9f7453ae9a4473cf43a16c186a090d77c4b3b (diff)
downloademacs-4f4a84ec801ea0d62d32a1b5679def1e16d3f813.tar.gz
emacs-4f4a84ec801ea0d62d32a1b5679def1e16d3f813.zip
Add new `input-decode-map' keymap and use it for temrinal
escape sequences. * keyboard.h (struct kboard): Add Vinput_decode_map. Remove Vlocal_key_translation_map. * keyboard.c (read_key_sequence): Add support for input-decode-map. (init_kboard): Init input-decode-map. Replace local-key-translation-map back with key-translation-map. (syms_of_keyboard): Declare input-decode-map. Remove local-key-translation-map. Update docstrings. (mark_kboards): Mark Vinput_decode_map. Don't mark Vlocal_key_translation_map. * keymap.c (Fdescribe_buffer_bindings): Describe input-decode-map. Replace local-key-translation-map back with key-translation-map. * term.c (term_get_fkeys_1, CONDITIONAL_REASSIGN): Bind in input-decode-map rather than function-key-map.
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/viper.texi10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi
index 4e9eaaff40e..c86b2383168 100644
--- a/doc/misc/viper.texi
+++ b/doc/misc/viper.texi
@@ -1745,7 +1745,8 @@ Setting this variable too high may slow down your typing. Setting it too
1745low may make it hard to type macros quickly enough. 1745low may make it hard to type macros quickly enough.
1746@item viper-translate-all-ESC-keysequences @code{t} on tty, @code{nil} on windowing display 1746@item viper-translate-all-ESC-keysequences @code{t} on tty, @code{nil} on windowing display
1747Normally, Viper lets Emacs translate only those ESC key sequences that are 1747Normally, Viper lets Emacs translate only those ESC key sequences that are
1748defined in the low-level key-translation-map or function-key-map, such as those 1748defined in the low-level @code{input-decode-map}, @code{key-translation-map}
1749or @code{function-key-map}, such as those
1749emitted by the arrow and function keys. Other sequences, e.g., @kbd{\\e/}, are 1750emitted by the arrow and function keys. Other sequences, e.g., @kbd{\\e/}, are
1750treated as @kbd{ESC} command followed by a @kbd{/}. This is good for people 1751treated as @kbd{ESC} command followed by a @kbd{/}. This is good for people
1751who type fast and tend to hit other characters right after they hit 1752who type fast and tend to hit other characters right after they hit
@@ -2009,12 +2010,12 @@ not emit the right signals for Emacs to understand. To let Emacs know about
2009those keys, you will have to find out which key sequences they emit 2010those keys, you will have to find out which key sequences they emit
2010by typing @kbd{C-q} and then the key (you should switch to Emacs state 2011by typing @kbd{C-q} and then the key (you should switch to Emacs state
2011first). Then you can bind those sequences to their preferred forms using 2012first). Then you can bind those sequences to their preferred forms using
2012@code{function-key-map} as follows: 2013@code{input-decode-map} as follows:
2013 2014
2014@lisp 2015@lisp
2015(cond ((string= (getenv "TERM") "xterm") 2016(cond ((string= (getenv "TERM") "xterm")
2016(define-key function-key-map "\e[192z" [f11]) ; L1 2017(define-key input-decode-map "\e[192z" [f11]) ; L1
2017(define-key function-key-map "\e[195z" [f14]) ; L4, Undo 2018(define-key input-decode-map "\e[195z" [f14]) ; L4, Undo
2018@end lisp 2019@end lisp
2019 2020
2020The above illustrates how to do this for Xterm. On VT100, you would have to 2021The above illustrates how to do this for Xterm. On VT100, you would have to
@@ -2206,6 +2207,7 @@ So much about Viper-specific bindings.
2206Manual}, and the Emacs quick reference card for the general info on key 2207Manual}, and the Emacs quick reference card for the general info on key
2207bindings in Emacs. 2208bindings in Emacs.
2208 2209
2210@vindex @code{input-decode-map}
2209@vindex @code{function-key-map} 2211@vindex @code{function-key-map}
2210@vindex @code{viper-vi-global-user-map} 2212@vindex @code{viper-vi-global-user-map}
2211@vindex @code{viper-insert-global-user-map} 2213@vindex @code{viper-insert-global-user-map}