Using CapsLock to switch between ABC and custom keyboard layout

In Sierra there's a handy option added to be able to switch, e.g. between Russian-PC and ABC (or U.S. International - PC) input sources.

Previously I've been using some hacks for that (using third-party soft to remap CapsLock to F19 and then using it for switching between input sources in Shortcuts setting. This way I lost ability to CapsLock at all), now I love it.

Except that I don't. Neither one of two given Ukrainian layouts is usable because they both have remapped keys (compared to all other keyboards in the world). No worry - we can edit layout using Ukelele app or find an edited one on the internet.

But after installing this layout - we no longer have that option to use CapsLock for switching input sources: - I love my mac and MacOS, but there are some keys swapped. Can I hav...- NO!

Does anyone know a way (if at all possible) to customize keyboard layout (using Ukelele or whatever it takes) so that it is acceptable by OS for switching between languages with CapsLock?

P. S.: my OS version is 10.13.6


This special new function for CapsLock does not seem to be very well documented by Apple–which should not come as a surprise to anyone who's been using their products for very long. Therefore, we don't seem to have been given the information needed to fully utilize or understand that feature.

So, basically, to answer your question: No, that does not seem to possible at this time.

However, there is a fairly simple work-around that can come close to duplicating that feature although there are some minor discrepancies which for me personally are actually preferable to the way the original feature was designed to work–although your preferences & priorities may obviously vary.

In any case, you could create a single custom keyboard based on the US keyboard that has the appropriate Ukrainian layout programmed directly into the CapsLock-based modifier combinations (keyboard layers or shift levels). Mac OSX essentially treats CapsLock as a regular, but locking, modifier key without any limitations. So, with Ukelele you may create a layout which supports both Latin & Cyrillic scripts and uses CapsLock to switch between them.

The Latin-based modifier combinations can mostly (if not entirely) be created automatically in several ways (the easiest being to duplicate the US keyboard you use, or create a layout that mirrors the currently active layout).

For the Cyrillic-based Ukrainian layers you can open a keyboard you wish to emulate (or approximate) and drag the key mappings from that keyboard to you yours (with the proper CapsLock-based modifier combination activated).

I don't think that a little bit of manual labor can be avoided, but you can accomplish your objective natively in this way. There are some potential advantages & disadvantages to this option depending on your preferences. For example, the flag will not change from US to Ukrainian which may be seen as a disadvantage. However, you will have the CapsLock LED as an indication which may be seen as an advantage. This also circumvents having to change the keyboard layout which is sometimes necessary when switching apps or documents, as well as the slight delay involved with that–that is of particular value to me as it drives me crazy when the keyboard layout is potentially different in each app.

If not for the OP, I hope this is informative or helpful to someone.


Current version of Ukelele (3.4.2) has a checkbox "Caps Lock Switch" for layouts in a bundle:

Ukelele caps lock switch setting

But you can manually do the same in Info.plist of your bundle by setting the key TICapsLockLanguageSwitchCapable to <true/>. Worked for me:

Now Caps Lock switching is available in Settings