unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Holger Ki <holger.ki@freenet.de>
To: help-gnu-emacs@gnu.org
Subject: key-translation-map and prefixes
Date: Fri, 5 Aug 2016 16:33:54 +0200	[thread overview]
Message-ID: <20160805143354.GA27047@dings64> (raw)

Dear ML,

I'm running GNU Emacs 24.5.1 in an ordinary Linux TTY using a PC-style
keyboard.

Before that I was using an editor striking similar to emacs + evil-mode.  :-)

In order to switch from insert state back to normal state in evil-mode,
one uses the escape key (like in vim).

A nice shortcut that worked in vim was to use the Alt-key together with
the next normal-state command to switch to normal state and do the
command without having to stretch to the escape key.

Now my question:
Is it possible to use a keyboard translation map
to map e.g. M-0, M-k, M-x, etc,
to the sequence escape key followed by 0, k or x?

Among other things I tried this in my .emacs:

(define-key key-translation-map (kbd "\M-0") 
  (kbd "\E 0"))

But this doesn't work, as the escape key still gets recognised as
ESC-prefix after the translation.

Is there a way to prevent emacs from interpreting the Escape key as
prefix again?

Holger



                 reply	other threads:[~2016-08-05 14:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20160805143354.GA27047@dings64 \
    --to=holger.ki@freenet.de \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).