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

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

Re: how to get Meta+y to be Meta+Tab


From: Nikolaj Schumacher
Subject: Re: how to get Meta+y to be Meta+Tab
Date: Sun, 26 Oct 2008 15:11:33 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin)

Xah <address@hidden> wrote:

> Xah wrote:
> «suppose i want to make Meta+y to function as pressing Meta+Tab.
> intuitively, i do this: (keyboard-translate ?\M-y ?\M-9) but that does
> not work.»
>
> B T Raven wrote:
> «Maybe (global-unset-key KEY)and then (global-set-key)? Some minor
> modes might override the new setting but probably most won't.»

It would be nice if you could use a more common quoting mechanism (like
a ">" prefix), so syntax highlighting picks up the quotation.  It makes
reading much easier.

> am pretty sure that global-set-key cannot be used for the
> functionality of keyboard-translate.

In a way it can.  You can bind it to a macro:

(global-set-key "\M-y" "\M-\t")

Using `keyboard-translate' is generally a little risky, because it will
change the key in all places.  So people wouldn't be able to do use C-c M-y
anymore.  So I would only use it to fix keyboard issues.

You can also write a function like this:

(defun do-what-backspace-does ()
  (interactive)
  (call-interactively (key-binding "\C-?")))

I've found that one to be the most reliable solution.


regards,
Nikolaj Schumacher




reply via email to

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