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: Wed, 5 Aug 2009 01:07:21 -0700 (PDT)
User-agent: G2/1.0

no one has mentioned this yet...

if you do
(keyboard-translate ?\C-t ?\C-x)

one problem is that ALL your C-t keys becomes C-x.
So, for example, in outline-mode, C-c C-t runs hide-body.
But now, when you type that, you get C-c C-x instead.

A better solution is:
(global-set-key (kbd "C-t") ctl-x-map)

  Xah
∑ http://xahlee.org/

☄

On Aug 4, 7:39 am, Elena <egarr...@gmail.com> wrote:
> Hello,
>
> since I use a Dvorak keyboard, I'd like to swap C-x and C-t, as it is
> suggested here:
>
> http://www.emacswiki.org/emacs/DvorakKeyboard#toc4
>
> The proposed code performs its task:
>
> http://www.emacswiki.org/emacs/DvorakKeyboard#toc4
>
> (keyboard-translate ?\C-x ?\C-t)
> (keyboard-translate ?\C-t ?\C-x)
>
> 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
>
> Any help?
>
> Thanks.


reply via email to

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