Hyper Key without Karabiner Elements

Does anyone know of a way to remap my caps lock key into cmd+opt+ctrl+shift (hyper key) without the use of Karabiner?

Karabiner has always made my MacBook do weird things like screen glitches on startup and other weird things like that. I would prefer not to use it.

I appreciate any help.

Try this approach.

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:

  1. When Caps Lock is pressed by itself = F18
  2. 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.

4 Likes

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.

You should be able to use Hammerspoon, I just think it brings with it a fair bit of extra configuration maintenance.

Okay great! I’ll check it out. Thanks.

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.

You know what? I am just starting to realize this might be a little past my level of expertise lol.

I think you might be right. At least, with my very limited knowledge, it seems to be that way.

You have to set-up more stuff with Hammerspoon. Take a look at Brett Terpstra’s old config and some of the config posted by others in the comments.

That’s just an excuse to learn something new :wink::nerd_face:

1 Like

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.

So far over the past few days, if I log out before I reboot/shutdown, that does seem to fix the issue for me.

Obviously limited data and YMMV, but FYI / FWIW.

1 Like

That’s great news, might give it a try again. It’s a Mac Mini so I don’t shut down often, feels like a simple step to add in between. :slight_smile:

Yep, that is the same exact thing I am experiencing, pink screen and all. I’m just going to uninstall for now.

Another option that may be worth a closer look.

2021-01-19-17.54.55

2 Likes

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.

1 Like