I hadnāt seen that. Very cool. Iāve bookmarked it in case I ever need it.
The only issue for me would be that this method is not quite the hyper key:
If your only use case for Karabiner is to remap the Caps Lock key - you may be able to use the OS X native hidutil utility to achieve the same result.
For example, the code below remaps the Caps Lock key to F18.
That is only ½ of what the hyper-key does for me:
When Caps Lock is pressed by itself = F18
When Caps Lock is pressed in addition to other keys = āā§āā„
The second option is, to me at least, most important than the first. I have all of my āglobalā shortcuts (which work regardless of what app is front-most) bound to Caps Lock + {key}.
You canāt use F18 + {key} the same way.
The hidutil method is just āRemapping Caps Lock key to another keyā which might be enough for some folks, but isnāt really what I suspect most people want with a true hyper key.
Yea I would be using it for the second option too for the ease of mind that Iām not messing with any other keyboard shortcuts from other apps or native to macOS.
Basically all my keyboard maestro macros are triggered by CAPS LOCK (aka cmd+opt+ctrl+shift) and another letter key.
Are you saying that this hammerspoon method will not work like that?
Thatās the nearest option I could find, and I agree, it isnāt a great match, but then I donāt think anything can be.
The thing is, Karabiner is doing some low-level wizardry, and it is the only thing that Iāve ever come across that goes down to that level to do this sort of thing. Everything else Iāve ever seen always piggy-backs the work being done and has Karabiner as a prerequisite.
Personally, Iāve never used Karabiner. I rely on my more traditional key combinations, Alfred workflows, Keyboard Maestro palettes, a Stream Deck and/or Touch Bar (Better Touch Tool FTW!). Iāve got so many ways to trigger so many things (often multiple ways), that the cognitive load of adding a hyper-key with Karabiner and just the fundamental need over the hundred of options have just never taken me down that path.
As it happens, I also *really* donāt like the idea of something poking around at that level without it being part of the OS or being developed in part with Apple. I remember some of the really low-level stuff I used to use at work on Windows that IBM developed in partnership with Microsoft, and even that caused headaches in the real world a lot of the time. I donāt want those headaches any more, and this sort of app can definitely affect system-stability, which is presumably what the OP has experienced.
The issue log on GitHub also makes for very interesting reading. While it is very powerful, the developers are absolutely doing some great work, and it is an app beloved of many of the Internetās more prominent Mac users, including yourself, some of the issues that seem to make it through put it in the ātoo riskyā bucket for me.
I might be mistaken, but I thought that I recalled that Hammerspoon had to be configured for Hyper Key in each application. However, I am not sure that is accurate or just something that I (mis)read awhile ago. I was about to try to set it up when Karabiner was released for Big Sur.
Okay so I was able to bind Caps Lock to F18 and created the launch agent so that this stays after reboot. I am kind of lost on how to bind F18 to the four other keys (cmd+opt+control+shift) via Hammerspoon tho.
Thank you for sharing this! I had to remove Karabiner on my new M1 Mac because it was causing a kernel panic on shutdown. Thought I had a faulty unit for awhileā¦
Huh. I donāt think Iām getting a KP on shutdown, but every time I restart my M1 MacBook Air, I get a message that āYour computer was restarted because of a problemā so I wonder if that problem is Karabiner.
Did you try logging out before you shutdown? I wonder if thereās a way to unload Karabiner on logout, if itās not already done.
You are experiencing the same thing I am. When I try to shut down all looked fine except for a brief pink screen would flash and I got the error on startup. Hereās the bug Iām tracking on GitHub. Lots of other users have reported the same behavior. I did not try logging out, but removing Karabiner resolved the problem for me entirely.
Lol. I saw that the other day and immediately updated BTT to the alpha. It didnāt work with the directional keys at first. Emailed the dev. He fixed it immediately and it works great now.
Funny how that just dropped in my lap after making my OG post.