Temporarily setting all caps?

Like a lot of folks, I use Karabiner Elements to have the CAPS LOCK key as a modifier for SHIFT+CTRL+OPTION+COMMAND. But sometimes, you know ... I would like to type all caps.

Is there a way that I temporarily engage an ALL CAPS mode with KM? I don't want to disable Karabiner Elements, but for the brief moments where I do need this to toggle a mode so that lower case characters are rendered in uppercase?

I'm not sure how you'd do this, as you'd need the macro to intercept every character you type, which is essentially a key logger, and I don't think Keyboard Maestro can (or should!) do that. About the only alternative I can think of is to have the macro pop up a text input box, then apply a Filter > Capitalize to the captured text, then paste it back into the frontmost app … and that seems kludgy as heck.

Alternatively, knowing nothing about Karabiner Elements, if you could simply toggle its active state via a macro, then you could have a macro that does just that—toggles its state. Run it once, type away in all caps, run it again, back to normal.

-rob.

2 Likes

I don't know anything about Karabiner Elements. But this macro will force CAPS LOCK if the user presses OPTION-F19. It kinda does what griffman was talking about. If you are not in an active text box when you are typing characters, you will probably get beeps, which is exactly what you would get if you typed characters in most apps when the text cursor isn't in a text box. Even if you don't like this macro, you can probably learn some things from it. For example, notice how I use the same macro to perform two different things based on which trigger was used to trigger it. I like using this approach.

CAPS LOCK IF USER PRESSES OPT-F19 Macro (v11.0.2)

CAPS LOCK IF USER PRESSES OPT-F19.kmmacros (7.0 KB)

3 Likes

Slick solution, @Airy!

-rob.

1 Like

Hello @Lloydi :wave:

I also use Karabiner Elements and the Hyperkey binding for capslock… I have a custom rule that also Toggles it’s normal function when pressed alone and held for about half a second or so … it seems that it is exactly what you are looking after …

If you want to have that rule I can share it with you … will look into my configuration tomorrow morning when I am in front of my iMac again …

Greetings from Germany

Tobias

As I recall, back when I used Karabiner-Elements, I used left shift + right shift to activate caps lock. In fact I think you may even find that option among KE's optional "complex" rules that come with the application. Otherwise, search for "Toggle caps_lock by pressing left_shift then right_shift" and you will find a couple of Github repositories that use it and you can copy the code from that.

Of course, if you are not (yet) confident editing KE's json file then tread carefully (and always back your file up prior to editing so you can quickly revert back to it if needed).

1 Like

Ah, that would be great. No hurry (clearly, it took me a month to come back and check this!).

Thanks