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

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

Re: Sticky escape key


From: Emanuel Berg
Subject: Re: Sticky escape key
Date: Sat, 19 Sep 2015 05:09:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Bob Proulx <bob@proulx.com> writes:

> You mapped it how? What did you do? Did you do it
> with the keyboard? With the terminal? With X and
> xmodmap? With setxkbmap? With a checkbox from your
> desktop manager dialog box? Some other method?

It seems to me from reading the OP's post that he
succeeded remapping the left control key to the escape
key, then he setup some shortcuts which uses the
escape key, and those also work, only the key
"sticks" - which is exactly what the escape key does!

But: Escape already does what meta does only meta
doesn't stick. When the OP sets up shortcuts with
escape he might as well use meta! (Or it is actually
better because it is what you expect.) Because:

    (global-set-key (kbd "ESC r") (lambda () (interactive) (message "ESC-r is 
M-r")))

Try this with escape and meta!

So the OP should rebind the left control key to meta
and that will do what he wants.

> Yes. No. Maybe. It can't be done for emacs running in
> a terminal because the terminal needs to know the
> difference between escape and control.

In the ttys, you can rebind escape with the familiar
method [1]. The escape key has keycode 1. You can then
do whatever with that key. Only it still "sticks"!
I don't know if Emacs or the terminal does that, but
I'll find out.

[1] http://user.it.uu.se/~embe8573/tty-emacs-keys.txt

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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