MacOS – type in inverse case, lIKE tHIS, with caps lock on

caps-lockkeyboardmacossnow leopard

Every so often, I have to type some text consisting mostly of uppercase letters, but with an occasional lowercase letter—essentially, sentence case, but inverted. On Windows, I would simply have caps lock on the entire time, and pressing Shift would give me a lowercase letter. On OS X, however, if caps lock is on, I only get uppercase letters, whether Shift is pressed or not.

So, I can either hold down Shift the entire time I'm typing, letting go of it briefly to type a lowercase letter, or press Caps Lock twice for each lowercase letter I type. Neither works as well as what Windows does.

Is there a way to get Caps Lock to behave as it does on Windows, where pressing Shift while caps lock is on produces lowercase letters?

I am running 10.6.

Best Answer

See Update below...

It seems (only) the input source "French - Numerical" will behave like Window Caps Lock (with iNVERSE sHIFT):

keyboard layout French - Numerical

Found that info here.

But note that this will come with a rather unusual keyboard layout (at least for me).

keyboard layout French - Numerical1

keyboard layout French - Numerical2

Update: Using Ukelele this can be applied to all keyboard layouts:

Thanks Daniel for pointing the right direction.

Open Ukelele and save your (current) layout to a file (e.g. by "New from current input source" and "Save"):

New from current input source

Open the .xml file in a text editor and find the mapIndex that you want to use for the combination + (shift + caps-lock). For German I used mapIndex="0". Insert this line:

<modifier keys="shift caps"/>

Find all other occurrences of this combination and comment them out (or delete the lines). Again for German it's:

<keyMapSelect mapIndex="1">
<modifier keys="anyShift"/>
<modifier keys="shift rightShift? caps? rightOption? rightControl"/>
<modifier keys="shift rightShift? caps? rightOption rightControl?"/>
<!--<modifier keys="shift rightShift? caps rightOption? rightControl?"/> -->
    </keyMapSelect>

shift caps

Re-open the modified file with Ukelele.

Here is a comparison of the "German" layout before and after the modification:

layout 1

layout 2

Follow the instructions in Ukelele to create a new input source (Name, ID, installation).

I didn't test the modified file, should work though.