On Fri, Jul 29, 2011 at 12:58:26PM +0900, Stephen J. Turnbull wrote:
Alan Mackenzie writes:
> I would like to put functions into function-key-map as the
bindings of a
> key sequence, something like:
> (define-key function-key-map [?\e ?\[ ?1 ?}]
> , the intention being that on receiving the key sequence ESC [
> the control modifier will be added to the next key received.
No, this doesn't work. In XEmacs, function-key-map doesn't
Lisp, it's a pure substitution of keystrokes for keystrokes. (More or
Oh, that's a shame.
> If there isn't the possibility of functions here, is there
> other way to do what I want?
The only thing I can think of is to bind ESC [ 1 } to a function
reads a key, modifies the event to add the control modifier, and
stuffs the key back in the event queue.
Maybe, I'll think about this.
What's the use case? Some kind of accessibility code?
My (tty) keyboard uses such codes for things like C-up. It would be much
nicer to be able to write
(global-set-key [(control up)] 'previous-line-6n)
(global-set-key [(meta \[) \1 } up] 'previous-line-6n)
. Or I could write a macro to place the entire key events into
Alan Mackenzie (Nuremberg, Germany).
XEmacs-Beta mailing list