There are multiple elpy keybindings that I am not using. Is there any way to unbind them? Possible bindings that I want to disable C-c C-t, C-c C-p.

I have tried following answer Globally override key binding in Emacs but it did not help.

I have also tried following, which did not work. Still does keybindings are bind to elpy.

(global-set-key (kbd "C-c C-t") nil)
(global-set-key (kbd "C-c C-p") nil)
  • 2
    Does this answer your question? How to unbind a key?
    – Marioba
    Feb 2, 2021 at 12:59
  • I have also tried (global-set-key (kbd "C-c C-t") nil) but it does not work. elpy keeps overwritten all keybindings
    – alper
    Feb 2, 2021 at 13:14

1 Answer 1


describe-key (C-h k C-c C-t) shows that C-c C-t is defined into the elpy-mode-map, so you have to unbind the key from this map:

(define-key elpy-mode-map (kbd "C-c C-t") nil)
  • C-c C-t is still bind to c → python-skeleton-class f → python-skeleton-for etc. Is it possible to disable that too? I think that one comes from python-mode
    – alper
    Feb 2, 2021 at 17:13
  • 1
    These are defined in the python-mode-map so you can unbind them with (define-key python-mode-map (kbd "C-c C-t") nil)
    – Marioba
    Feb 2, 2021 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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