Emacs daemon: swapping keys

284 views Asked by At

I'd like to swap C-x and C-u with Emacs daemon (since I switched to Dvorak layout). The regular keyboard-translate doesn't work with Emacs daemon. In the help-gnu-emacs I found a solution: I should use (define-key key-translation-map ...) instead of (keyboard-translate ...). However, even though the swap works without problems in many cases (e.g., C-x s) I've been finding cases in which the swap doesn't work properly such as in C-u M-x eshell (when I type this last command all I get is "eeee". But if I type M-x twice the command works as it's supposed to). Do you know any solution to this problem?

Further details:

That's what I have in my .emacs:

;; swap C-x and C-u
(define-key key-translation-map [?\C-x] [?\C-u])
(define-key key-translation-map [?\C-u] [?\C-x])

I'm using Emacs 23.3.1.

Thanks!

1

There are 1 answers

0
event_jr On BEST ANSWER

you're seeing an existing Emacs bug. I'm not sure about the priority of this bug, but if you send your user story to the bug tracker e-mail: [email protected], it'll get more visibility and possibly get fixed.