问题描述
我想在PyCharm中使用CapsLock-u和CapsLock-n在代码和运行/终端之间切换.
I would like to switch between Code and Run/Terminal with CapsLock-u and CapsLock-n in PyCharm.
在键盘上,u
位于顶部,n
位于底部,这为我提供了一个很好的记忆方式.
On my keyboard u
is at the top, and n
is at the bottom, this gives me a good way to memorize this.
我不知道如何配置我的Ubuntu 16.04(统一)桌面.
I have no clue how to configure my Ubuntu 16.04 (unity) desktop like this.
推荐答案
我有一个利用pycharm切换器的解决方案.
I have a solution that utilizes the pycharm's switcher.
请注意,在当前的窗口设置中,我将终端作为屏幕上的第五个窗口,这可能与您的情况有所不同.这也与Pycharm 2016.3
- 转到编辑">宏">开始宏录制".
- 现在pycharm将记录您的击键.
- 按 Ctrl + Tab .转到编辑">宏">停止宏录制".给它起个名字,例如:切换到代码
- 要记录第二个宏:重复步骤1至3,但现在记录: Ctrl + Tab,在不释放Ctrl的情况下释放Tab,然后按5(或切换台屏幕中终端的任何数字).
- 转到文件">设置">键盘映射"向下滚动到名为宏"的文件夹.左键单击标题>添加键盘快捷键>记录您的快捷键 ex:Caps Lock + u
- 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
现在,您可以使用按键绑定在pycharm上播放宏.如果您要更改窗口的布局,请记住也要更新宏!
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!
祝你好运:)
这篇关于PyCharm:使用CapsLock-u和CapsLock-n在代码和运行/终端之间切换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!