3
0

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 5 years have passed since last update.

Docker でキーバインドControl + pが2回押さないと反応しない件

Last updated at Posted at 2019-04-16

概要

Dockerにattach(Dockerに入るイメージ)し、コンソールで使うキーバインドControl+pを押すと1度目は反応せず、2度目で入力されたと見なされる。
Docker導入時、設定変更せずに使っていると起きるのだが...
原因としてはdettach keyというDockerにattachした後にdetach(Dockerから出るイメージ)するキーのデフォルト設定でControl+p Control+qが割り当てられているからであった。

環境

Docker version 18.09.2, build 6247962

対応策

Dockerの設定ファイルでdetachキーを変更すればよい。
私の場合、以下の場所に設定ファイルがあるので、このファイルに"detachKeys"という設定を追加する。

~/.docker/config.json
{
    "detachKeys": "ctrl-\\"
}

ちなみにctrl-\\としましたが、キーバインドに設定されていないキーであればなんでもよいです。
ctrl-^でもよいので使いやすいように変更できます。

参考↓
Docker コンテナの中で、Ctrl-p を二回押さないと使えない

docker で Ctrl-p 2回押し問題 (detach-keys の問題) を解決するには

補足
macOS High Sierra 10.14.3

3
0
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
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?