Microsoft Remote DesktopでHHKBを使う

Windows環境での作業が必要になったので、 リモートデスクトップMacからWindowsを使用するための準備を行いました。

リモートデスクトップ接続するためのアプリはいくつか候補がありましたが、 今回は用途に合っていた「Microsoft Remote Desktop」を選びました。

Windows 11 Homeを使用していましたが、 Microsoft Remote Desktopで接続するにはProエディションにする必要があったため Windows 11 Proを購入しました。

普段Macを使用しているので、 Microsoft Remote Desktopで接続した時のWindowsキーIMEの切り替え操作に馴染めず、 Karabinerに以下のルールを追加しました。

  • 左のcommandキーをWinのControlキー
  • 右のcommandキーをWinのIME切り替え
{
  "title": "Custom rules for Remote Desktop",
  "rules": [
    {
      "description": "Swap left_control and left_command in Remote Desktop",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "left_command",
            "modifiers": {
              "optional": ["any"]
            }
          },
          "to": [
            {
              "key_code": "left_control"
            }
          ],
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "^com\\.microsoft\\.rdc\\.macos$"
              ]
            }
          ]
        }
      ]
    },
    {
      "description": "Toggle IME with right_command in Remote Desktop",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "right_command",
            "modifiers": {
              "optional": ["any"]
            }
          },
          "to": [
            {
              "key_code": "grave_accent_and_tilde",
              "modifiers": ["right_alt"]
            }
          ],
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "^com\\.microsoft\\.rdc\\.macos$"
              ]
            }
          ]
        }
      ]
    }
  ]
}