I am using the package key-chord. This package allows me to hit x x quickly instead of hitting M-x:

(key-chord-define-global "xx" 'execute-extended-command)

And here is another way to to set a key-chord (code below is equivalent to the above):

(global-set-key (kbd "<key-chord> x x") 'counsel-M-x)

How can I set a key-chord for the C-c prefix?

This question and this post are not the same as mine as he is creating his own prefix, whereas a I just want to bind <key-chord> c c to C-c


I believe I found the solution:

(key-chord-define-global "cc" 'null)
(define-key key-translation-map (kbd "<key-chord> cc")  (kbd "C-c"))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.