all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

* 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.
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.