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

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

Re: keyboard-translate working for Control but not for Alt


From: Xah Lee
Subject: Re: keyboard-translate working for Control but not for Alt
Date: Tue, 4 Aug 2009 11:37:37 -0700 (PDT)
User-agent: G2/1.0

On Aug 4, 7:39 am, Elena <egarr...@gmail.com> wrote:
> since I use a Dvorak keyboard,
> ...
> Out of curiosity, I tried to swap M-x and M-t as well:
>
> (keyboard-translate ?\M-x ?\M-t)
> (keyboard-translate ?\M-t ?\M-x)
>
> but evaluating each expression fail with (numbers are not the same):
>
> Debugger entered--Lisp error: (wrong-type-argument characterp
> 134217848)
>   keyboard-translate(134217848 134217844)
>   eval((keyboard-translate 134217848 134217844))
>   eval-last-sexp-1(nil)
>   eval-last-sexp(nil)
>   call-interactively(eval-last-sexp nil nil)
>
> Software:
> - Windows XP SP3
> - GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-
> MJASON

Oops, didn't see your real question in my previous post.

Sorry don't have info on that except i have M-a as M-x. Not done as
keyboard-translate, but simply:
(global-set-key (kbd "M-a") 'execute-extended-command)

Note that the shortcuts M-x and C-x are rather logically in different
category.

M-x is not a prefix. It is just a shortcut to invoke command by name
(execute-extended-command). The “x” there is a mnemonic for eXtended.

While, C-x is a generic prefix to extend emacs's shortcuts system as
key combo sequences (meaning, you type a series of key combinations to
complete a shortcut. (e.g. C-x C-b, C-x 5 1, C-c C-f, C-h i))

The command shell-command (M-!) share more similarity to execute-
extended-command (M-x). So, it makes more sense to have these two
commands share similar shortcuts, either as a Shift and non-shift
version, or Ctrl vs Alt version. Using Shift for invoking similar/
reversal functions is conventional in modern apps. Using Ctrl vs Alt
for this purpose is traditional in emacs.

Emacs's M-x and C-x sharing the same letter “x” is rather a mistake i
think, since they dont have that much logical commonality. I think
this is also a major cause of confusion in emacs's shortcuts.

  Xah
∑ http://xahlee.org/

reply via email to

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