[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: more key bindings for xterm
From: |
Dan Nicolaescu |
Subject: |
Re: more key bindings for xterm |
Date: |
Tue, 19 Apr 2005 15:44:17 -0700 |
[I am replying to this message, but I will try to address all the
concerns that have been expressed in this thread].
Stefan Monnier <address@hidden> writes:
> > Would it be acceptable to add something like:
> > (substitute-key-definition [f29] [C-f5] function-key-map) to xterm.el?
>
> Would it work?
> I thought the translation from esc-sequence to <f29> is already done by
> function-key-map (with elements added by reading the terminfo data) and
> you function-key-map is not iterated, so once we get f29 we don't look at
> function-key-map again.
As I said in another message substitute-key-definition works, and the
reason why it would be needed is what you just stated above.
I have talked to Thomas Dickey (the xterm maintainer) and he said that
the F13 -> S-F1 and similar mappings are the default behavior for
xterm for PC-style keyboards, that code was added to xterm in 1999.
We can assume that mapping for all terminals, hence we need to
use substitute-key-definition in xterm.el.
Thomas also recommended that we document that all these new key
bindings are not guaranteed to work on all xterms. I will add that to
the NEWS file when this patch is completed.
Eli had concerns about the strings emitted by different keys
colliding. It seems that there aren't any.
I have tested this patch on i386-redhat-linux-gnu (Fedora Core 3), and
sparc-sun-solaris2.8 and xterm-200. It works as expected.
May I check it in?
--dan
*** xterm.el 12 Apr 2005 16:02:18 -0700 1.13
--- xterm.el 19 Apr 2005 15:13:16 -0700
***************
*** 178,183 ****
--- 178,243 ----
(set-keymap-parent map (keymap-parent function-key-map))
(set-keymap-parent function-key-map map))
+ ;;; The terminal intialization C code file might have initialized
+ ;;; function keys F13->F60 from the termcap/terminfo information. On
+ ;;; a PC-style keyboard these keys correspond to
+ ;;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The
+ ;;; code here subsitutes the corresponding defintions in
+ ;;; function-key-map. This substitution is needed because if a key
+ ;;; definition if found in function-key-map, there are no further
+ ;;; lookups in other keymaps.
+ (substitute-key-definition [f13] [S-f1] function-key-map)
+ (substitute-key-definition [f14] [S-f2] function-key-map)
+ (substitute-key-definition [f15] [S-f3] function-key-map)
+ (substitute-key-definition [f16] [S-f4] function-key-map)
+ (substitute-key-definition [f17] [S-f5] function-key-map)
+ (substitute-key-definition [f18] [S-f6] function-key-map)
+ (substitute-key-definition [f19] [S-f7] function-key-map)
+ (substitute-key-definition [f20] [S-f8] function-key-map)
+ (substitute-key-definition [f21] [S-f9] function-key-map)
+ (substitute-key-definition [f22] [S-f10] function-key-map)
+ (substitute-key-definition [f23] [S-f11] function-key-map)
+ (substitute-key-definition [f24] [S-f12] function-key-map)
+
+ (substitute-key-definition [f25] [C-f1] function-key-map)
+ (substitute-key-definition [f26] [C-f2] function-key-map)
+ (substitute-key-definition [f27] [C-f3] function-key-map)
+ (substitute-key-definition [f28] [C-f4] function-key-map)
+ (substitute-key-definition [f29] [C-f5] function-key-map)
+ (substitute-key-definition [f30] [C-f6] function-key-map)
+ (substitute-key-definition [f31] [C-f7] function-key-map)
+ (substitute-key-definition [f32] [C-f8] function-key-map)
+ (substitute-key-definition [f33] [C-f9] function-key-map)
+ (substitute-key-definition [f34] [C-f10] function-key-map)
+ (substitute-key-definition [f35] [C-f11] function-key-map)
+ (substitute-key-definition [f36] [C-f12] function-key-map)
+
+ (substitute-key-definition [f37] [C-S-f1] function-key-map)
+ (substitute-key-definition [f38] [C-S-f2] function-key-map)
+ (substitute-key-definition [f39] [C-S-f3] function-key-map)
+ (substitute-key-definition [f40] [C-S-f4] function-key-map)
+ (substitute-key-definition [f41] [C-S-f5] function-key-map)
+ (substitute-key-definition [f42] [C-S-f6] function-key-map)
+ (substitute-key-definition [f43] [C-S-f7] function-key-map)
+ (substitute-key-definition [f44] [C-S-f8] function-key-map)
+ (substitute-key-definition [f45] [C-S-f9] function-key-map)
+ (substitute-key-definition [f46] [C-S-f10] function-key-map)
+ (substitute-key-definition [f47] [C-S-f11] function-key-map)
+ (substitute-key-definition [f48] [C-S-f12] function-key-map)
+
+ (substitute-key-definition [f49] [A-f1] function-key-map)
+ (substitute-key-definition [f50] [A-f2] function-key-map)
+ (substitute-key-definition [f51] [A-f3] function-key-map)
+ (substitute-key-definition [f52] [A-f4] function-key-map)
+ (substitute-key-definition [f53] [A-f5] function-key-map)
+ (substitute-key-definition [f54] [A-f6] function-key-map)
+ (substitute-key-definition [f55] [A-f7] function-key-map)
+ (substitute-key-definition [f56] [A-f8] function-key-map)
+ (substitute-key-definition [f57] [A-f9] function-key-map)
+ (substitute-key-definition [f58] [A-f10] function-key-map)
+ (substitute-key-definition [f59] [A-f11] function-key-map)
+ (substitute-key-definition [f60] [A-f12] function-key-map)
+
;; Set up colors, for those versions of xterm that support it.
(defvar xterm-standard-colors
;; The names in the comments taken from XTerm-col.ad in the xterm
- Re: more key bindings for xterm, (continued)
- Re: more key bindings for xterm, Dan Nicolaescu, 2005/04/13
- Re: more key bindings for xterm, Stefan Monnier, 2005/04/13
- Re: more key bindings for xterm, Dan Nicolaescu, 2005/04/13
- Re: more key bindings for xterm, Eli Zaretskii, 2005/04/13
- Re: more key bindings for xterm, Stefan Monnier, 2005/04/13
- Re: more key bindings for xterm, Dan Nicolaescu, 2005/04/13
- Re: more key bindings for xterm, Dan Nicolaescu, 2005/04/14
- Re: more key bindings for xterm, Stefan Monnier, 2005/04/14
- Re: more key bindings for xterm, Dan Nicolaescu, 2005/04/14
- Re: more key bindings for xterm,
Dan Nicolaescu <=
- Re: more key bindings for xterm, Stefan Monnier, 2005/04/19
- Re: more key bindings for xterm, Richard Stallman, 2005/04/20
- Re: more key bindings for xterm, Stefan Monnier, 2005/04/20
- Re: more key bindings for xterm, Richard Stallman, 2005/04/15
- Re: more key bindings for xterm, Dan Nicolaescu, 2005/04/15
- Re: more key bindings for xterm, Richard Stallman, 2005/04/14