LoginSignup
0
0

More than 5 years have passed since last update.

Karabiner-Elements でキーバインド変えたら、VIM 使ってる時に困った

Posted at

何をしたか

  • Karabiner-Elements で PC-Style Shortcut という Complex Modifications を適用した

何に困ったか(例)

  • VIM 使っている時
    • Ctrl+v で短形ヴィジュアルモードに移行しなくなった
    • Ctrl+v でエスケープシーケンス送れなくなった
    • Ctrl+a Ctrl+e 等でカーソル移動しなくなった
  • iTerm2 上で
    • Ctrl+f でカーソル移動しなくなった(検索窓が開く)

どう対応したか

  • frontmost_application_unless 使って PC-Style 適用アプリを iTerm2 以外にしよう
    • 元の JSON ファイルを変更し .config/karabiner/assets/complex_modifications/ 以下へ下記例のような内容の適当なファイル名で配置

例:PC-Style Paste を iTerm2 には適用しない

{
  "title": "PC-Style Shortcuts(without iterm2)",
  "rules": [
    {
      "description": "PC-Style Paste(without iterm2)",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "v",
            "modifiers": {
              "mandatory": [
                "control"
              ],
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "v",
              "modifiers": [
                "left_command"
              ]
            }
          ],
          "conditions": [
            {
              "type": "frontmost_application_unless",
              "bundle_identifiers": [
                "^com\\.googlecode\\.iterm2$"
              ]
            }
          ]
        }
      ]
    }
  ]
}
0
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
0
0