all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: Sticky escape key
Date: Sat, 19 Sep 2015 05:09:46 +0200	[thread overview]
Message-ID: <8737yb2jgl.fsf@debian.uxu> (raw)
In-Reply-To: 20150918164750569537901@bob.proulx.com

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	other threads:[~2015-09-19  3:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 13:05 Sticky escape key Surya Kiran Gullapalli
2015-09-18 22:54 ` Emanuel Berg
2015-09-18 22:59 ` Bob Proulx
2015-09-19  3:09   ` Emanuel Berg [this message]
2015-09-20 23:37     ` Bob Proulx
2015-09-21  0:06       ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737yb2jgl.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.