How to swap CTRL/CMD for all of my shortcuts?
How to swap CTRL/CMD for all of my shortcuts?
I'm using Emacs mode for keymap in PyCharm, except in Emacs I'm used to swaps CMD with CTRL. This is setting is enabled in Emacs with (setq mac-command-modifier 'control)
(setq mac-command-modifier 'control)
Is there some way to swap CMD/CTRL keys in my Emacs PyCharm keymap that is faster than manually changing it for every shortcut using GUI? IE, is the settings file stored by PyCharm something I can modify directly?
2 Answers
2
I'm not sure how you installed PyCharm, but for me on Linux, it's inside ~/pycharm-<version>/lib/resources.jar
~/pycharm-<version>/lib/resources.jar
Rename the jar to zip and open it. The keymaps folder has the xmls you want to edit.
keymaps
Honestly it may be easiest to use something like Better Touch Tool to rebind your CMD and CTRL for just PyCharm. This would allow everything else on your machine to function as it ought and still allow for the binding you prefer in PyCharm.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Thanks, I found the file, but it seems more complicated than I thought, shortcuts are split over several files, and I can't find some of them in any, like "Duplicate Line"
– Yaroslav Bulatov
Sep 24 at 23:10