[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: key binding
From: |
Mickey Ferguson |
Subject: |
RE: key binding |
Date: |
Wed, 5 Feb 2014 20:12:07 +0000 |
Stefan Monnier wrote:
>Post by Mickey Ferguson
>(global-set-key (kbd "<escape><f3>") (lambda () (interactive)
>(compare-windows t)))
>Try
>(global-set-key [M-f3] (lambda () (interactive) (compare-windows t)))
>or
>(global-set-key [?\e f3] (lambda () (interactive) (compare-windows t)))
>The problem with your binding is that it uses the `escape' event.
>This event is normally unbound and turned (via function-key-map) into an
>ESC event (the "ASCII char 27 known as 'escape'") to which lots of
>things are bound. This mapping is because ESC is what is received in
>a text terminal when you press the `escape' key, so some code somewhere
>needs to "unify" the ESC char (from the tty) and the `escape' event
>(from the GUI library).
Thanks, Stefan. The latter suggestion worked. And since my problem is
now solved, I'm happy! :-) And thanks also for the great explanation of
what was wrong with my original attempt. A lot of stuff I didn't know.
- key binding, Mickey Ferguson, 2014/02/04
- RE: key binding,
Mickey Ferguson <=