I would like to switch between Code and Run/Terminal with CapsLock-u and CapsLock-n in PyCharm.
On my keyboard u
is at the top, and n
is at the bottom, this gives me a good way to memorize this.
I have no clue how to configure my Ubuntu 16.04 (unity) desktop like this.
I have a solution that utilizes the pycharm's switcher.
Note that in my current window setup, I have the terminal as the 5th window on screen, that maybe different on your case. Also this is relevant to Pycharm 2016.3
- Go to Edit > Macros > Start Macro Recording.
- Now pycharm will record your keystrokes.
- Press Ctrl + Tab. Go to Edit > Macros > Stop Macro Recording. Give it a name, ex: switch to code
- To record the second macro: repeat steps 1 through 3 but now record: Ctrl + Tab, release Tab without releasing Ctrl and press 5 (or whatever the number is for your terminal in the switcher screen).
- Go to File > settings > keymap scroll down to the folder named Macros. Left click on the title > add keyboard shortcut > Record your shortcut ex: Caps Lock + u
Now you can use your key bindings to playback the macro on pycharm. If you ever change the layout of your window, remember to update the macros as well!
Good luck :)