6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

VSCodeのターミナルでBashのショートカットを使えるようにする

Last updated at Posted at 2020-04-29

VSCodeのターミナルでWSLのシェルを開くと、Ctrl+p、Ctrl+k等が使えない。
VSCodeでショートカットキーに定義されてるものが使えません。

File > Preferences > Keyboard Shortcuts
を選択してショートカットの設定画面を出す
画面右上にある 
Open Keyboard Shortcuts(JSON)をクリック
次のような記述で、ショートカットを無効にしたいキーを羅列する。

[
    {
        "key": "ctrl+p",
        "command": "",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+e",
        "command": "",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+f",
        "command": "",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+k",
        "command": "",
        "when": "terminalFocus"
    },
]

Qiitaでも類似した解決策があったんですが、こんなシンプルな記述ではなかったので、書いてみました。

6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?