help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Difference between GUI/terminal when using "kbd" macro


From: Kevin Rodgers
Subject: Re: Difference between GUI/terminal when using "kbd" macro
Date: Tue, 19 Feb 2013 08:58:49 -0700
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

On 2/18/13 12:33 PM, Felix Crux wrote:
Thanks for the suggestion; it actually led to an interesting discovery:

With the keybinding set to (kbd "C-x<escape>"), running "C-x<escape>  C-h"
(in a terminal session, since in a GUI one it quits Emacs) shows the following:

   Global Bindings Starting With C-x ESC:
   key             binding
   ---             -------
   C-x ESC ESC     repeat-complex-command

This got me thinking about the fact that the help system is calling it "ESC",
not "<escape>", and wondering about whether that is significant.

I then tried changing the binding to (kbd "C-x ESC"), which actually works in
both graphical and terminal sessions!

In conclusion, it looks as though there is a difference between "ESC" and
"<escape>", at least as far as the "kbd" macro is concerned. I don't know
enough about the topic to be sure, but I would speculate that "<escape>" is
some sort of special meta-character being sent by the X window system, while
"ESC" is the lower-level key value.

Very interesting stuff; and it now lets me use the more readable form, too!
I'm still quite curious about the discrepancy, but at least the original
problem is solved. Thank you!

See the "Named ASCII Control Characters" node of the Emacs manual, and the
"Function Keys" node of the Emacs Lisp manual.

--
Kevin Rodgers
Denver, Colorado, USA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]