1

I am in a weird situation. Karabiner is messing my external keyboard settings, so I can't use it - it is a Windows keyboard.

So, I am looking for a way how to be able to turn on Caps Lock when I press left and right shift at the same time. Or shift and Caps Lock but my Caps Lock is set to be Escape ( via Modifier keys in Settings) because of Vim modes in programs I use often.

Any idea how to be able to use caps lock is appreciated.

P.S. Fn key is out of options because because of the way it is set in the Windows keyboard it is not able to be used by macOS.

2
  • 1
    Why don't you just configure Karabiner to not manage the external keyboard? Feb 20, 2022 at 20:57
  • I use a Windows keyboard with Karabinier with no issues - what do you mean by Messing the settings?
    – mmmmmm
    Feb 20, 2022 at 21:00

2 Answers 2

2

You can add custom complex modifications to Karabiner, I wrote one to do exactly this.

{
  "title": "Change right_shift + left_shift to caps_lock",
  "description": "Change right_shift + left_shift to caps_lock",
  "manipulators": [
    {
      "from": {
        "key_code": "left_shift",
        "modifiers": {
          "mandatory": ["right_shift"],
          "optional": ["caps_lock"]
        }
      },
      "to": [
        {
          "key_code": "caps_lock"
        }
      ],
      "type": "basic"
    },
    {
      "from": {
        "key_code": "right_shift",
        "modifiers": {
          "mandatory": ["left_shift"],
          "optional": ["caps_lock"]
        }
      },
      "to": [
        {
          "key_code": "caps_lock"
        }
      ],
      "type": "basic"
    }
  ]
}

1
  • If my response was helpful, please consider marking it as the accepted answer. This will assist other users in quickly identifying the solution if they encounter a similar question.
    – Y. Gherbi
    May 22, 2023 at 21:31
0

I had to reformat your JSON a bit to get Karabiner to accept it and allow me to enable (before rearranging the headers as below, if I dropped a file with this content into ~/.config/karabiner/assets/complex_modifications it would appear but without an enable button). Thank you though - I was struggling before I found this!

{
"title": "Change right_shift + left_shift to caps_lock",
"rules": [
    {
        "description": "Change right_shift + left_shift to caps_lock",
        "manipulators": [
            {
                "from": {
                    "key_code": "left_shift",
                    "modifiers": {
                        "mandatory": [
                            "right_shift"
                        ],
                        "optional": [
                            "caps_lock"
                        ]
                    }
                },
                "to": [
                    {
                        "key_code": "caps_lock"
                    }
                ],
                "type": "basic"
            },
            {
                "from": {
                    "key_code": "right_shift",
                    "modifiers": {
                        "mandatory": [
                            "left_shift"
                        ],
                        "optional": [
                            "caps_lock"
                        ]
                    }
                },
                "to": [
                    {
                        "key_code": "caps_lock"
                    }
                ],
                "type": "basic"
            }
        ]
    }
]

}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .