• You are not logged in.

    Colemak for Mac. No 3rd Party Apps!

    • Started by FloppyDisco
    • 1 Replies:
    • Reputation: 1
    • Registered: 15-Feb-2025
    • Posts: 1

    Follow me down this rabbit hole...


    I'm about 1 year into my Colemak transition.
    I love it.
    My wife thinks I'm crazy.
    I swapped all the keycaps on my MacBook to be in Colemak.
    I'm never going back...

    iOS includes Colemak as an available option under the "input sources" which is an easy solution and it was actually one of the tipping points for me to buy into this Keyboard-Cult I now find myself a part of. It has, however, one glaring problem, which for me is a deal breaker:
    - changing the 'input source' to Colemak remaps ALL connected keyboards. not just the internal keyboard on the laptop???
    I have a split keyboard I use at my desk. it is programmed to do a bunch of hipster $h!t, and it's layout is Colemak. So it gets mapped from Colemak to Double-Colemak! (not as good. much more confusing...)

    This basically means that every time I had to switch from my laptop to my split keyboard I had to go and change the setting back and forth and it just killed me. I'm WAY too lazy for that.

    So then I went down the path of installing KE. and it is a great program. I learned a bunch of cool things using it and it's very easy to iterate over.
    It also had a tiny bug that sort of got in my way.
    I end up taking a lot of screen shots and screen recordings at work so I can document bugs or communicate with coworkers and clients.
    For whatever reason. whenever I have KE running for a few hours there is a NOTICEABLE delay when pressing the shortcut for Screenshot (cmd + shift + 4). I mean like 2-3 SECONDS. it's pretty bad.
    this is the only key that shows any problems I press the shortcut and it will be a huge delay. and then the cursor will change from the pointer to the screenshot crosshair. 
    turn off KE and the problem goes away immediately. It is the only key that does anything weird. but alas it proved to get the better of me.

    So I found myself wondering if I could find a solution that would allow me to remap "only my laptop's internal keyboard" and "have "ZERO performance drawbacks"

    I got close.

    following some posts here and here
    I was able to create a working `'UserKeyMapping'`using `hidutil`.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.bluesteel.Colemak</string>
        <key>ProgramArguments</key>
        <array>
            <string>/usr/bin/hidutil</string>
            <string>property</string>
            <string>--matching</string>
            <string>{"ProductID": 0x0343}</string>
            <string>--set</string>
            <string>{"UserKeyMapping":[
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000008,
                    "HIDKeyboardModifierMappingDst": 0x700000009
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000015,
                    "HIDKeyboardModifierMappingDst": 0x700000013
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000017,
                    "HIDKeyboardModifierMappingDst": 0x70000000A
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x70000001C,
                    "HIDKeyboardModifierMappingDst": 0x70000000D
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000018,
                    "HIDKeyboardModifierMappingDst": 0x70000000F
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x70000000C,
                    "HIDKeyboardModifierMappingDst": 0x700000018
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000012,
                    "HIDKeyboardModifierMappingDst": 0x70000001C
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000013,
                    "HIDKeyboardModifierMappingDst": 0x700000033
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000016,
                    "HIDKeyboardModifierMappingDst": 0x700000015
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000007,
                    "HIDKeyboardModifierMappingDst": 0x700000016
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000009,
                    "HIDKeyboardModifierMappingDst": 0x700000017
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x70000000A,
                    "HIDKeyboardModifierMappingDst": 0x700000007
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x70000000D,
                    "HIDKeyboardModifierMappingDst": 0x700000011
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x70000000E,
                    "HIDKeyboardModifierMappingDst": 0x700000008
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x70000000F,
                    "HIDKeyboardModifierMappingDst": 0x70000000C
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000033,
                    "HIDKeyboardModifierMappingDst": 0x700000012
                },
                {
                    "HIDKeyboardModifierMappingSrc": 0x700000011,
                    "HIDKeyboardModifierMappingDst": 0x70000000E
                }
            ]}</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
    </dict>
    </plist>

    You will need to change the ProductID property to be the correct ID number for your machine, you can find your keyboard's ProductID by opening the app "System Information". You will find it under 'Hardware > SPI > Apple Internal Keyboard > Product ID'.

    You can modify or generate the keycodes for this .plist file here. but it does not include the lines to match it to the internal keyboard.

    You'll need to save this file as

    com.bluesteel.Colemak

    in one of two locations:

    /Library/LaunchAgents/

    if you save the file here that should be it it should just work, I think. but it will only ever work after Login.

    /Library/LaunchDaemons/

    I am trying to figure out how to get this script to run at STARTUP that way it will still be active before login. I have read that services that are stored in /LaunchDaemons/ are supposed to do this? but that does not seem to be the case for me so far with this service. I do not know why. If you save the file here you'll need to run the following:

    sudo launchctl bootstrap system /Library/LaunchDaemons/com.bluesteel.Colemak.plist
    sudo launchctl enable system/com.bluesteel.Colemak

    after which this service should run at login for ANY user that logs in to the computer. At least that is the behavior I am getting. If anyone knows how to get this service to run at Startup that would be greatly appreciated.

    Anyway it remaps the internal keyboard and does not affect the behavior of any external keyboards, it also does not have any delay when pressing the screenshot button.
    Other people may not have experienced the issue with the screenshot button but it drove me crazy so ultimately I had to remove KE and I have all the special sauce living in QMK on my keyboard.

    unfortunately, it seems that this fix only works for swapping keys one-for-one. so you cannot set "caps lock" to be "meh" or anything like that. but it works well for changing everything to Colemak.

    - Josh

    Offline
    • 1
    • Reputation: 117
    • From: UK
    • Registered: 14-Apr-2014
    • Posts: 980

    My solution to this problem is to never use the inbuilt keyboard of a laptop, and only use programmable boards. I have a small portable keyboard (Atreus) which I take with my laptop to handle this use case, but most of the time I'm at my desk so it's fine. I leave the OS set to Qwerty.

    I don't know what the Karabiner issue is - maybe you should report it ?

    Another solution I could think of is to have a Qwerty base layer on your split board that you could switch to as necessary, and then leave your mac set to Colemak in the OS.

    Using Colemak-DH with Seniply.

    Offline
    • 0