The key combination C-c
is not convenient to type in the keyboard layout I use, and I'm trying to do change it globally. The goal is to replace every occurrence of C-c
with another binding <apps> d
, such that sending a message in Gnus would be <apps> d <apps> d
, compiling in auxtex would be the same, and the user prefix key C-c
would also always be <apps> d
. The key <apps>
is <f19>
on my keyboard.
Reading the manual, it seems that I need to use key-translation map
. It does work great with the translation of <f19>
to <apps>
(define-key key-translation-map (kbd "<f19>") (kbd "<apps>"))
(global-set-key (kbd "<apps> s") 'save-buffer)
Unfortunately, it does not work when I want to do this for C-c
.
(define-key key-translation-map (kbd "<apps> d") (kbd "C-c"))
When I try to use it, I get
<apps> d is undefined
and if I look it up (C-h k
), I see
<apps> d (translated from <f19> d) is undefined
Is there a way to make this work?
input-decode-map
) has this in its documentation: "The events that come from bindings in `input-decode-map' are not themselves looked up in `input-decode-map'." Which makes sense, if you think about it: this would be a way to prevent infinite translations.