本サイトにはプロモーションが含まれています
完成形
ショートカットキーでPythonを実行できるようになります。
![](https://tokukichi.com/wp-content/uploads/2023/02/python_run_shortcut_finish.gif)
設定方法
歯車マークをクリックします。
![](https://tokukichi.com/wp-content/uploads/2023/02/python_run_shortcut_01_png-1024x578.png)
「KeyBoard Shortcuts」をクリックします。
![](https://tokukichi.com/wp-content/uploads/2023/02/python_run_shortcut_02_png-1024x579.jpg)
「Python: Run」を入力し「Python File in Terminal」の+マークをクリックします。
![](https://tokukichi.com/wp-content/uploads/2023/02/python_run_shortcut_03_png-1024x633.jpg)
Pythonを実行するショートカットキーを設定します。
ここでは「cmd + r」キー設定しています。
他のショートカットキーと被っていましたが、「cmd + r」が直感的だったのと、普段使用しないコマンドだったので気にせず設定しました。
![](https://tokukichi.com/wp-content/uploads/2023/02/python_run_shortcut_04_png-1024x574.jpg)
「cmd+r」で実行できるようになりました。
![](https://tokukichi.com/wp-content/uploads/2023/02/python_run_shortcut_finish.gif)
補足
VSCode標準にはPythonを実行するショートカットが標準搭載されていないので、自分で設定する必要があります。
以上になります。
本サイトにはプロモーションが含まれています