LoginSignup
5
2

More than 3 years have passed since last update.

Karabiner-Elementsを使ってMac版Splashtopから接続するWindows用にキーボード設定

Last updated at Posted at 2020-06-10

Mac版のSplashtop personalにはキーボードマップ機能が無いので、Karabiner elementsを使って設定してみました。

参考

https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/conditions/frontmost-application/
https://webrandum.net/karabiner-elements/#toc6
https://github.com/JoshuaManuel/Karabiner-Elements-Key-List
https://jill-tone.com/windows_uskeyboard/

注意

Karabinerを使ってキーボードの内容は変更できるが、Splashtop側のキーボードを変更できるわけではないので、japanese_pc_nfer label: PCキーボードの無変換キーのような特殊なキーが使えない。(Mac専用のキーボードをWindowsで使っている感じ)

そのため、今回は英数キーを半角・全角キーにしている。

また、Control + Shift等の2つ以上の補助キーを押しながらのコマンドにSplashtopが対応していないように見える。

手順

karabinerをインストール

公式ページへ移動してダウンロードし、インストールを行う。

https://github.com/pqrs-org/Karabiner-Elements/releases/download/v12.9.0/Karabiner-Elements-12.9.0.dmg

JSONファイルを設置する。

Mac版の以下のディレクトリに適当な名前のjsonファイルを作成する。

~/.config/karabiner/assets/complex_modifications

screen2.png

screen1.png

jsonファイルの内容

{
  "title": "カスタム",
  "rules": [
    {
      "description": "Splashtop用",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "left_command"
          },
          "to": [
            {
              "key_code": "left_control"
            }
          ],
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "^com\\.splashtop\\.stp\\.macosx$"
              ]
            }
          ]
        },
        {
          "type": "basic",
          "from": {
            "key_code": "right_command"
          },
          "to": [
            {
              "key_code": "right_control"
            }
          ],
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "^com\\.splashtop\\.stp\\.macosx$"
              ]
            }
          ]
        },
        {
          "type": "basic",
          "from": {
            "key_code": "japanese_eisuu"
          },
          "to":[
            {
              "key_code": "japanese_kana",
              "modifiers": ["left_option"]
            }
          ],
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "^com\\.splashtop\\.stp\\.macosx$"
              ]
            }
          ]
        },
        {
          "type": "basic",
          "from": {
            "key_code": "japanese_kana"
          },
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "^com\\.splashtop\\.stp\\.macosx$"
              ]
            }
          ]
        }
      ]
    }
  ]
}

bundle_identifiers 項目の ^com\\.splashtop\\.stp\\.macosx$という部分でSplashtopで使う時だけキーボードが変更されるようにする。

設定を適用

作成した設定を適用する。

snapshot3.png

Karabiner-elementsのアプリケーションウィンドウの、Complex modificationsのRulesを選択し、左下のAdd ruleをクリックする。

出てきた一覧から、先程作成したsplashtop用の項目の右にあるEnableボタンをクリックして適用できる。

注意

設定すると、JISキーボードがUSキーボードとして認識されることがあります。

対処法は以下の記事を参照ください。

Karabiner-ElementsでJISキーボードがUSキーボードとして認識される問題
https://qiita.com/kenmaz/items/0ff152af776a3e6e5f6e

Splashtopで確認

Splashtop上でコマンドキーを押すとControlキーを押した感じになり、英数キーを押すと全角半角に変わることを確認する。

もし、うまく動作していない場合はKarabiner-elementsのアプリケーションウィンドウの、Logを確認する。

Karabinerを使わないでキーボードの調整をしたい

VMWare FusionやParalells Desktopの仮想Windows上でSplashtopをインストールし、キーボード調整等を使用すると、更に使いやすいです。

もちろん、その分のリソースが減るので、一長一短ではありますが。

5
2
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
5
2