4

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

6
  • Is your custom layout in .keylayout or .bundle format? Aug 26, 2018 at 12:26
  • I think I've tried both, but I may need to double-check that. Why? Aug 26, 2018 at 12:36
  • .bundle format has a language setting that might help. Also try setting .layout to cyrillic if it is currently set to Unicode. Aug 26, 2018 at 13:17
  • PS You could also try different Keyboard Layouts folders. Aug 26, 2018 at 13:39
  • 2
    I did try all that. I've even managed my custom layout to show up not in 'other' caregory, but under 'Ukrainian' language, alongside with stock 'Ukrainian' and 'Ukrainian - PC' layouts. But it is still not applicable for out-of-the-box caps-lock switching option. I've given up, installed my custom ukrainian layout, remapped caps-lock to F19 using karabiner-elements app and assigned F19(CapsLock) to 'select the previous input source'. Thanks for help anyway. Maybe Apple will tweak ukrainian-PC layout to 'normal' state later. Like - in couple of years... Aug 27, 2018 at 10:04

3 Answers 3

3

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.

1
  • That IS a tricky workaround. Interesting approach though. Won't work for me, but good to know there is an option. Jul 13, 2019 at 20:04
1

My answer is for those who wants to use the Caps Lock for changing layout and doesn't need its original purpose (and as me myself has found this question).

You can use karabiner utility to remap default Caps Lock behaviour to emulate some non-existing key (F13 for example).

binding Caps Lock to F13

Then open system settings and use Caps Lock to bind this key to change keyboard layout (sorry for the screen in Russian, I believe it's still clear). binding Caps Lock for Layout change

Karabiner can be easily installed via brew: brew cask install karabiner-elements

P.S. You can also replace (possibly useless) eject or power key with missing del (delete_forward at my first screen).

1

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

You must log in to answer this question.

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