Karabiner-elements: Karabiner completely broken on macOS Big Sur

Created on 22 Jun 2020  ·  80Comments  ·  Source: pqrs-org/Karabiner-Elements

It seems the beta broke Karabiner completely. The program opens and runs, but doesn't actually modify any keys.

Re-entering configurations does not fix it, nor does messing around with permissions to my knowledge.

Most helpful comment

If you are doing only simple remapping, you can use Apple's built-in hidutil tool.

This was good enough for me (I only have 2 simple remaps - Caps Lock to Esc, and Esc to backtick). You can refer to this gist - I linked to an explainer blog post that I wrote from the gist in case you need a little bit more help.

All 80 comments

Looks like the kext isn't loading, but this is all probably expected. @tekezo has been working on a DriverKit version for a while already, so we likely just need to be patient while that develops over the summer :)

Well, actually:

$ kextstat | grep Karabiner
  159    0 0xffffff7f9f095000 0x2000     0x2000     org.pqrs.driver.Karabiner.VirtualHIDDevice.v061000 (6.10.0) 4D004D1A-ED2F-3780-AD53-A10F286EC759 <51 6 5 3 1>

(I guess I should clarify at this point that this is with SIP off, which lets the kext load, but it still does nothing useful except steal all keyboard input and make it really annoying to make the computer usable again.)

Yep, I'll be waiting on a workaround. It's all that works with my spacebar broken.

I have a similar problem!!!

Workaround pls

[2020-06-22 20:52:50.513] [info] [grabber] Load /Users/ddigiacomo/.config/karabiner/karabiner.json... [2020-06-22 20:52:50.513] [info] [console_user_server] Load /Users/ddigiacomo/.config/karabiner/karabiner.json... [2020-06-22 20:53:08.232] [error] [grabber] console_user_server_client error: Connection reset by peer [2020-06-22 20:53:08.232] [info] [grabber] console_user_server_client is closed. (uid:501) [2020-06-22 20:53:08.232] [info] [grabber] event_tap_monitor terminated [2020-06-22 20:53:08.235] [info] [grabber] device_grabber is stopped. [2020-06-22 20:53:08.235] [info] [grabber] device_grabber is started. [2020-06-22 20:53:08.238] [info] [grabber] event_tap_monitor initialized [2020-06-22 20:53:08.239] [info] [grabber] virtual_hid_device_client is started. [2020-06-22 20:53:08.239] [info] [grabber] Load /Library/Application Support/org.pqrs/config/karabiner.json... [2020-06-22 20:53:08.239] [info] [grabber] core_configuration is updated. [2020-06-22 20:53:09.247] [warning] [grabber] virtual_hid_device_client is not connected yet. Please wait for a while. [2020-06-22 20:53:44.695] [info] [grabber] version 12.9.6 [2020-06-22 20:53:44.720] [info] [grabber] device_open_permitted [2020-06-22 20:53:44.722] [info] [grabber] task_policy_set is called. [2020-06-22 20:53:44.730] [info] [grabber] session_monitor_receiver is initialized [2020-06-22 20:53:44.732] [info] [grabber] device_grabber is started. [2020-06-22 20:53:44.732] [info] [grabber] receiver is initialized [2020-06-22 20:53:44.737] [info] [grabber] virtual_hid_device_client is started. [2020-06-22 20:53:44.737] [info] [grabber] receiver: bound [2020-06-22 20:53:44.737] [info] [grabber] receiver: chown socket: 0 [2020-06-22 20:53:44.737] [info] [grabber] Load /Library/Application Support/org.pqrs/config/karabiner.json... [2020-06-22 20:53:44.738] [info] [grabber] core_configuration is updated. [2020-06-22 20:53:44.738] [info] [grabber] session_monitor_receiver: bound [2020-06-22 20:53:45.447] [info] [kextd] version 12.9.6 [2020-06-22 20:53:45.450] [info] [observer] version 12.9.6 [2020-06-22 20:53:45.506] [info] [observer] device_open_permitted [2020-06-22 20:53:45.508] [info] [observer] device_observer is started. [2020-06-22 20:53:45.509] [info] [observer] grabber_client is started. [2020-06-22 20:53:45.510] [info] [observer] matching device: [2020-06-22 20:53:45.510] [info] [observer] registry_entry_id: 4294968232 [2020-06-22 20:53:45.510] [info] [observer] product: Apple Internal Keyboard / Trackpad [2020-06-22 20:53:45.510] [info] [observer] vendor_id: 1452 [2020-06-22 20:53:45.510] [info] [observer] product_id: 632 [2020-06-22 20:53:45.510] [info] [observer] location_id: 0x1000000 [2020-06-22 20:53:45.511] [info] [observer] is_keyboard: true [2020-06-22 20:53:45.512] [info] [observer] is_pointing_device: false [2020-06-22 20:53:45.512] [info] [observer] rescan devices... [2020-06-22 20:53:45.512] [info] [observer] grabber_client is connected. [2020-06-22 20:53:45.512] [info] [observer] rescan devices... [2020-06-22 20:53:45.512] [info] [observer] matching device: [2020-06-22 20:53:45.512] [info] [observer] registry_entry_id: 4294968239 [2020-06-22 20:53:45.512] [info] [observer] product: Apple Internal Keyboard / Trackpad [2020-06-22 20:53:45.512] [info] [observer] vendor_id: 1452 [2020-06-22 20:53:45.512] [info] [observer] product_id: 632 [2020-06-22 20:53:45.512] [info] [observer] location_id: 0x1000000 [2020-06-22 20:53:45.516] [info] [observer] is_keyboard: false [2020-06-22 20:53:45.517] [info] [observer] is_pointing_device: true [2020-06-22 20:53:45.517] [info] [observer] Apple Internal Keyboard / Trackpad (device_id:4294968232) is observed. [2020-06-22 20:53:45.517] [info] [observer] rescan devices... [2020-06-22 20:53:45.523] [info] [observer] Apple Internal Keyboard / Trackpad (device_id:4294968239) is observed. [2020-06-22 20:53:45.748] [warning] [grabber] virtual_hid_device_client is not connected yet. Please wait for a while. [2020-06-22 20:53:52.065] [info] [observer] matching device: [2020-06-22 20:53:52.065] [info] [observer] registry_entry_id: 4294969090 [2020-06-22 20:53:52.065] [info] [observer] vendor_id: 1452 [2020-06-22 20:53:52.065] [info] [observer] product_id: 34304 [2020-06-22 20:53:52.066] [info] [observer] is_keyboard: true [2020-06-22 20:53:52.067] [info] [observer] is_pointing_device: false [2020-06-22 20:53:52.067] [info] [observer] rescan devices... [2020-06-22 20:53:52.071] [info] [observer] (vendor_id:0x5ac, product_id:0x8600) (device_id:4294969090) is observed. [2020-06-22 20:53:58.756] [info] [observer] matching device: [2020-06-22 20:53:58.756] [info] [observer] registry_entry_id: 4294969264 [2020-06-22 20:53:58.756] [info] [observer] manufacturer: Apple [2020-06-22 20:53:58.756] [info] [observer] product: Magic Keyboard [2020-06-22 20:53:58.756] [info] [observer] vendor_id: 76 [2020-06-22 20:53:58.756] [info] [observer] product_id: 615 [2020-06-22 20:53:58.756] [info] [observer] location_id: 0x46eb9ce3 [2020-06-22 20:53:58.756] [info] [observer] serial_number: [redacted] [2020-06-22 20:53:58.757] [info] [observer] is_keyboard: true [2020-06-22 20:53:58.757] [info] [observer] is_pointing_device: false [2020-06-22 20:53:58.758] [info] [observer] rescan devices... [2020-06-22 20:53:58.759] [info] [observer] Magic Keyboard (device_id:4294969264) is observed. [2020-06-22 20:54:04.944] [info] [kextd] KextManagerLoadKextWithURL: kOSReturnSuccess [2020-06-22 20:54:43.948] [info] [console_user_server] version 12.9.6 [2020-06-22 20:54:43.969] [info] [session_monitor] version 12.9.6 [2020-06-22 20:54:43.971] [info] [session_monitor] receiver is initialized [2020-06-22 20:54:43.972] [info] [session_monitor] session_monitor_receiver_client is started. [2020-06-22 20:54:43.980] [info] [session_monitor] on_console_changed: true [2020-06-22 20:54:43.981] [info] [session_monitor] receiver: bound [2020-06-22 20:54:43.985] [info] [grabber] current_console_user_id: 501 [2020-06-22 20:54:43.985] [info] [session_monitor] session_monitor_receiver_client is connected. [2020-06-22 20:54:43.986] [info] [grabber] event_tap_monitor terminated [2020-06-22 20:54:43.991] [info] [grabber] device_grabber is stopped. [2020-06-22 20:54:43.991] [info] [grabber] receiver is terminated [2020-06-22 20:54:43.991] [info] [grabber] device_grabber is started. [2020-06-22 20:54:43.991] [info] [grabber] receiver is initialized [2020-06-22 20:54:44.001] [info] [grabber] event_tap_monitor initialized [2020-06-22 20:54:44.001] [info] [grabber] virtual_hid_device_client is started. [2020-06-22 20:54:44.001] [info] [grabber] receiver: bound [2020-06-22 20:54:44.001] [info] [grabber] receiver: chown socket: 501 [2020-06-22 20:54:44.001] [info] [grabber] Load /Library/Application Support/org.pqrs/config/karabiner.json... [2020-06-22 20:54:44.003] [info] [grabber] core_configuration is updated. [2020-06-22 20:54:44.312] [info] [console_user_server] receiver is initialized [2020-06-22 20:54:44.313] [info] [console_user_server] receiver: bound [2020-06-22 20:54:44.313] [info] [console_user_server] grabber_client is started. [2020-06-22 20:54:44.313] [info] [console_user_server] grabber_client is connected. [2020-06-22 20:54:45.013] [warning] [grabber] virtual_hid_device_client is not connected yet. Please wait for a while. [2020-06-22 20:54:45.103] [error] [observer] grabber_client error: Connection reset by peer [2020-06-22 20:54:45.103] [info] [observer] grabber_client is closed. [2020-06-22 20:54:46.112] [info] [observer] grabber_client is connected. [2020-06-22 20:54:46.112] [info] [observer] rescan devices... [2020-06-22 20:54:50.610] [info] [grabber] karabiner_console_user_server is connected. [2020-06-22 20:54:50.610] [info] [grabber] console_user_server_client is connected. (uid:501) [2020-06-22 20:54:50.612] [info] [grabber] event_tap_monitor terminated [2020-06-22 20:54:50.620] [info] [grabber] device_grabber is stopped. [2020-06-22 20:54:50.620] [info] [grabber] device_grabber is started. [2020-06-22 20:54:50.621] [info] [grabber]system_preferencesis updated. [2020-06-22 20:54:50.622] [info] [grabber] event_tap_monitor initialized [2020-06-22 20:54:50.622] [info] [grabber] virtual_hid_device_client is started. [2020-06-22 20:54:50.622] [info] [grabber] Load /Users/ddigiacomo/.config/karabiner/karabiner.json... [2020-06-22 20:54:50.624] [info] [grabber] core_configuration is updated. [2020-06-22 20:54:50.690] [info] [console_user_server] Load /Users/ddigiacomo/.config/karabiner/karabiner.json... [2020-06-22 20:54:50.692] [info] [console_user_server] core_configuration is updated. [2020-06-22 20:54:50.856] [info] [console_user_server] Check for updates... [2020-06-22 20:54:51.632] [warning] [grabber] virtual_hid_device_client is not connected yet. Please wait for a while.

Just want to add my log to this issue - the kext isn't loading either for me. For the affected who map ESC to Caps Lock, you can remap this in Keyboard Prefs -> Modifier Keys... -> _Select Keyboard_ -> toggle from Caps Lock to Escape.

BetterTouchTool also allows for creating keyboard hotkeys, which can be used as a replacement for some cases.

For example I created hotkeys for option + hjkl as arrow keys, which I did through karabiner before. Hopefully that makes it less painful for some of you :)

Any alt for disabling internal keyboard?

For me, upon upgrading to _Big Sur_ I could not whitelist kexts — the option is there, and it asked me to do so and reboot afterwards, but it seems kind of broken (upon boot the kexts would remain disabled).

However, I tried disabling SIP (reboot into recovery, open terminal, csrutil disable;reboot) and it _did_ let me whitelist the kext. After that, though, karabiner actually was stuck in an odd state where the keyboard was effectively no longer working, but Karabiner could not communicate with its kext. I will reply with the log when I get around to it, but it was a different error than shown in the other log posted.

I had to remove Karabiner to regain use of my keyboard (which itself was also a hassle, as upgrading somehow made /Applications read-only, even to root, even in recovery…)

For me, upon upgrading to _Big Sur_ I could not whitelist kexts — the option is there, and it asked me to do so and reboot afterwards, but it seems kind of broken (upon boot the kexts would remain disabled).

However, I tried disabling SIP (reboot into recovery, open terminal, csrutil disable;reboot) and it _did_ let me whitelist the kext. After that, though, karabiner actually was stuck in an odd state where the keyboard was effectively no longer working, but Karabiner could not communicate with its kext. I will reply with the log when I get around to it, but it was a different error than shown in the other log posted.

I had to remove Karabiner to regain use of my keyboard (which itself was also a hassle, as upgrading somehow made /Applications read-only, even to root, even in recovery…)

I hit this same issue.. you can also pull up the onscreen keyboard if you have a trackpad or a mouse that is still working via
system preferences > accessibility > keyboard > accessibility keyboard

thats how I was able to uninstall and get my keyboard to work again.

image
looks like disabling SIP does allowed kernel extensions to work for the beta period though. that said, currently karabiner-elements will effectively disable your keyboard from what I can see

With SIP off the extension does load (as it should) but Karabiner doesn't like the that KextManagerLoadKextWithURL is returning (-603979775).

With SIP off the extension _does_ load (as it should) but Karabiner doesn't like the that KextManagerLoadKextWithURL is returning (-603979775).

dang. looks like that maps to Internal OSMetaClass run-time error. from libkern_metaclass_err(1)
#define kOSMetaClassInternal libkern_metaclass_err(1) // runtime internal error
https://opensource.apple.com/source/xnu/xnu-344.2/libkern/libkern/OSReturn.h.auto.html

https://stackoverflow.com/questions/13548957/translate-osreturn-value-to-human-readable-definition/51303759

Oh, huh, interesting. I wonder if that is coming from the kernel or in userspace from IOKit/KernelManagement.framework?

Anyone know another way to map space to right command? That was my workaround for a badly broken space bar.

If you are doing only simple remapping, you can use Apple's built-in hidutil tool.

This was good enough for me (I only have 2 simple remaps - Caps Lock to Esc, and Esc to backtick). You can refer to this gist - I linked to an explainer blog post that I wrote from the gist in case you need a little bit more help.

Wow, TIL! Thanks for sharing, it works great :)

@chuyeow Thanks for sharing! But I can't figure out how to map "fn" key since it doesn't seem to have a code.

But I can't figure out how to map "fn" key since it doesn't seem to have a code.

@HiroshiHorie Hmm I won’t be at a Mac for awhile so I can’t test it, but I did find this: https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-308/IOHIDFamily/AppleHIDUsageTables.h. Don’t know if 0x0003 will work but worth a try.

@chuyeow the command keys are called "GUI" in the table. The function key may also have a counter-intuitive name 🤷‍♀️

Oh, huh, interesting. I wonder if that is coming from the kernel or in userspace from IOKit/KernelManagement.framework?

yeah I'm also curious. was looking backwards in the commit history to see if another method for the kext load might work
trying to use a computer without karabiner installed is brutal

Wanted to point out other issues I’ve encountered:
Same as above, installs and opens but no functionality.
First few installs it would disable my internal keyboard along with any keyboard that was plugged in at boot up. (Keyboard will work fine if connected after MacOS/Karabiner boots up)
Can confirm kext issues as I had to do a clean install of Big Sur. The first install would fail during kext loading.

I’m not super familiar with the code as I’m a measly web dev. but hope this helps.

With SIP off the extension does load (as it should) but Karabiner doesn't like the that KextManagerLoadKextWithURL is returning (-603979775).

Hm. I don't actually think this is the case. I built and ran the current build and got the following output

[2020-06-24 15:30:34.635] [info] [observer] Apple Internal Keyboard / Trackpad (device_id:4294969063) is observed.
[2020-06-24 15:30:34.636] [info] [observer] matching device:
[2020-06-24 15:30:34.636] [info] [observer]   registry_entry_id: 4294969059
[2020-06-24 15:30:34.636] [info] [observer]   manufacturer: Apple Inc.
[2020-06-24 15:30:34.636] [info] [observer]   product: Apple Internal Keyboard / Trackpad
[2020-06-24 15:30:34.636] [info] [observer]   vendor_id: 1452
[2020-06-24 15:30:34.636] [info] [observer]   product_id: 832
[2020-06-24 15:30:34.636] [info] [observer]   location_id: 0xffffffff80500000
[2020-06-24 15:30:34.636] [info] [observer]   serial_number: FM79412098FHYYKAB+TWZ
[2020-06-24 15:30:34.639] [info] [observer]   is_keyboard: false
[2020-06-24 15:30:34.640] [info] [observer]   is_pointing_device: true
[2020-06-24 15:30:34.640] [info] [observer] rescan devices...
[2020-06-24 15:30:34.653] [info] [observer] Apple Internal Keyboard / Trackpad (device_id:4294969059) is observed.
[2020-06-24 15:30:34.825] [info] [kextd] KextManagerLoadKextWithURL: kOSReturnSuccess

It should be noted that if I do not have Karabiner 'grabbing' any input devices (all the devices in the Devices tab are unchecked) it does not break key input.
However, as soon as I check my keyboard the input is broken.

[2020-06-24 15:36:15.008] [info] [grabber] Apple Internal Keyboard / Trackpad (device_id:4294969063) is grabbed.

that is the last line of karabiner's log.

Also worth noting, despite the initialize_virtual_hid_keyboard appearing to work in the log, it does not appear in the System Prefs -> Modifier Keys -> Devices dropdown.

[2020-06-24 15:30:58.226] [info] [observer] grabber_client is closed.
[2020-06-24 15:30:58.342] [info] [grabber] karabiner_console_user_server is connected.
[2020-06-24 15:30:58.342] [info] [grabber] console_user_server_client is connected. (uid:501)
[2020-06-24 15:30:58.343] [info] [grabber] device_grabber is started.
[2020-06-24 15:30:58.344] [info] [grabber] `system_preferences` is updated.
[2020-06-24 15:30:58.352] [info] [grabber] event_tap_monitor initialized
[2020-06-24 15:30:58.352] [info] [grabber] virtual_hid_device_client is started.
[2020-06-24 15:30:58.353] [info] [grabber] virtual_hid_device_client is opened.
[2020-06-24 15:30:58.353] [info] [grabber] virtual_hid_device_client_ is connected
[2020-06-24 15:30:58.353] [info] [grabber] initialize_virtual_hid_keyboard
[2020-06-24 15:30:58.353] [info] [grabber]   country_code:0
[2020-06-24 15:30:58.356] [info] [observer] matching device:
[2020-06-24 15:30:58.356] [info] [observer]   registry_entry_id: 4294970350
[2020-06-24 15:30:58.356] [info] [observer]   manufacturer: pqrs.org
[2020-06-24 15:30:58.356] [info] [observer]   product: Karabiner VirtualHIDKeyboard
[2020-06-24 15:30:58.356] [info] [observer]   vendor_id: 5824
[2020-06-24 15:30:58.356] [info] [observer]   product_id: 10203
[2020-06-24 15:30:58.356] [info] [observer]   location_id: 0x0
[2020-06-24 15:30:58.356] [info] [observer]   serial_number: pqrs.org:org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDKeyboard_v061500
[2020-06-24 15:30:58.358] [info] [observer]   is_keyboard: true
[2020-06-24 15:30:58.362] [info] [grabber] Load /Users/jake/.config/karabiner/karabiner.json...
[2020-06-24 15:30:58.364] [info] [grabber] core_configuration is updated.
[2020-06-24 15:30:58.376] [info] [console_user_server] Load /Users/jake/.config/karabiner/karabiner.json...
[2020-06-24 15:30:58.377] [info] [observer]   is_pointing_device: false
[2020-06-24 15:30:58.377] [info] [observer] rescan devices...
[2020-06-24 15:30:58.377] [info] [console_user_server] core_configuration is updated.
[2020-06-24 15:30:58.384] [info] [observer] Karabiner VirtualHIDKeyboard (device_id:4294970350) is observed.
[2020-06-24 15:30:58.497] [info] [console_user_server] Check for updates...
[2020-06-24 15:30:58.525] [info] [observer] grabber_client is connected.
[2020-06-24 15:30:58.525] [info] [observer] rescan devices...

*please ignore the v061500 build number for the virtualHIDKeyboard. I was building it locally to see if I had any success with debugging.

If you are doing only simple remapping, you can use Apple's built-in hidutil tool.

This was good enough for me (I only have 2 simple remaps - Caps Lock to Esc, and Esc to backtick). You can refer to this gist - I linked to an explainer blog post that I wrote from the gist in case you need a little bit more help.

Is there a way to map Caps Lock to Command + Shift + Control + Option?

If you are doing only simple remapping, you can use Apple's built-in hidutil tool.

@chuyeow thank you so much for this info! Now I can set it and forget it 😃 ‎ (at least for the foreseeable future!)

But I can't figure out how to map "fn" key since it doesn't seem to have a code.

@HiroshiHorie Hmm I won’t be at a Mac for awhile so I can’t test it, but I did find this: https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-308/IOHIDFamily/AppleHIDUsageTables.h. Don’t know if 0x0003 will work but worth a try.

this one didn't work for me. I've been looking but haven't found anything. Does you know if karabiner-eventViewer is having issues as well? Could possibly test the fn key there?

There is a note on https://karabiner-elements.pqrs.org since yesterday

image

Is it related?

Are we going through what happened from Karabiner to Karabiner-Elements again? 😭

There is a note on https://karabiner-elements.pqrs.org since yesterday

image

Is it related?

Are we going through what happened from Karabiner to Karabiner-Elements again? 😭

I don't think it is quite the same. The legacy kext should actually still work with Big Sur, I'm wondering if maybe its a macOS beta bug or if something is hanging after the karabiner_grabber notification is posted.

That said, it looks like quite a bit of progress has been made on the DriverKit version of the dext
https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice

I downloaded and ran the client app and the macOS 11 beta was already recognizing the virtual device so I wouldn't be too worried.

Will it be possible to remap the function key with Karabiner Elements in the future on Big Sur? I'm hoping they didn't remove that functionality...

for those who are looking for a short term solution. you can also try Keyboard Maestro, BetterTouchTool is good, but it doesn't follow the system key repeat and delay setting when you want to use ctrl+hjkl to navigate, it's still very slow after you set to the shortest repeat time.

@xyoun The problem I have with those tools are that they work at a very high level. The reason I used Karabiner was because it works at such a low level that I never needed to worry about lag, etc.

In the meantime, some of us may consider becoming sponsors, even for some limited period of time. I guess most of us use tekezo's software anytime we touch our Macs!

Another temporary solution people could try is Hammerspoon (if you don't mind learning a little Lua). I just made this video about how I remade my Karabiner hotkeys with Hammerspoon after Karabiner stopped working on macOS Big Sur: https://youtu.be/wpVNm8Ub-1s

@elliotwaite Unfortunately my current keyboard mappings use both Hammerspoon & Karabiner. It's based on this amazing layout. I'll have a look at your video and see if if it gives me the super duper mode.

@vviikk, ah, that might be a little tricky, but it should be possible Hammerspoon by just watching for raw keyboard events with hs.eventtap and altering them as needed.

My karabiner isn't crashing on big sur, but simple modifications seem to be a bit wonky, and complex modifications not working at all.

I simply use "disable internal keyboard" when an external keyboard is connected. It is not working in Big Sur.

Tried some terminal commands but nothing worked. Any ideas? Thanks in advance~

Update to my above comment -- no key modifications work at all, simple or complex.

I built a tool that you can use to generate simple key remaps using hidutil until Karabiner gets fixed. I've always used Karabiner for a single key remap, so using hidutil is perfect for me. Inspired by @chuyeow.

https://hidutil-generator.netlify.app/

Code:
https://github.com/amarsyla/hidutil-key-remapping-generator

Thanks guys, observed the same problem. Thanks to @chuyeow for solution and @dchakarov for this article https://dchakarov.com/blog/macbook-remap-keys/

From TN2450, it wasn't immediately obvious that you could map the Fn key with hidutil, but, FYI, it does work if you use 0xFF00000003: 0x00FF (kHIDPage_AppleVendorTopCase) << 32 + 0x0003 (kHIDUsage_AV_TopCase_KeyboardFn) -- kHIDPage_AppleVendorTopCase being a different HIDPage than kHIDPage_KeyboardOrKeypad, which is the 0x7 in other hidutil examples.

If you are doing only simple remapping, you can use Apple's built-in hidutil tool.

This was good enough for me (I only have 2 simple remaps - Caps Lock to Esc, and Esc to backtick). You can refer to this gist - I linked to an explainer blog post that I wrote from the gist in case you need a little bit more help.

How would I remap caps lock to esc OR control, depending on context?

I would also welcome any advice. My purpose is just switch right command with right option.
K.

For an one-to-one remapping, the website by @amarsyla works really well (using hid), just use it accordingly by following the instructions, and log out and in. That's it.

(I used it to remap Caps Lock to Right Control, as it's not present on an Apple wireless keyboard, so I could map it using BetterTouchTool as a quasi Hyperkey. Still miss Karabiner, though, for other things.)

@benwf
Thank you so much!!! Works like a charm :)

K.

How would I remap caps lock to esc OR control, depending on context?

I used hidutil for the simple mappings, and Hammerspoon for the more complex ones, e.g. for Caps Lock -> Ctrl/Escape see https://github.com/jasonrudolph/ControlEscape.spoon

Can somebody please tell me if this issue is being fixed ?

Can somebody please tell me if this issue is being fixed ?

Yes. Look here https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice

Can somebody please tell me if this issue is being fixed ?

Yes. Look here https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice

@nikitavoloboev how to use that VirtualHidDevice? I use "Activate driver extension" in extensionManager, it shows "request of org.pqrs.Karbiner-DriverKit-VirtualHIDDevice is failed with error: The operation couldn't be completed. (OSSystemExtensionErrorDomain error: 8.) Do I need to disable SIP?

I would say, wait for official release of it before using. Meaning wait until Karabiner Elements actually implements it with the new version number upgrade.

Is there a branch with the DriverKit development? I'd love to help out if help is needed. Otherwise, I'll just wait for 13.0.0 - it's my penalty for being a developer and using the beta.

There is no DriverKit branch yet in Karabiner Elements repo. But the DriverKit repo itself is here https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice.

Can read https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/blob/master/DEVELOPMENT.md if you want to help out.

I built a tool that you can use to generate simple key remaps using hidutil until Karabiner gets fixed. I've always used Karabiner for a single key remap, so using hidutil is perfect for me. Inspired by @chuyeow.

https://hidutil-generator.netlify.app/

Code:
https://github.com/amarsyla/hidutil-key-remapping-generator

I'm new to using hidutil... I used your tool but I'm having no luck with it. My application is remapping F-keys on an external keyboard to the standard Mac multimedia-type keys. Do I need to do anything different for it to work with an external keyboard or these specific keys?

There appears to be an active DriverKit branch now FWIW

There is indeed a lot of work, with a merge onto master + a beta released earlier today: https://karabiner-elements.pqrs.org/docs/macos-big-sur

There is indeed a lot of work, with a merge onto master + a beta released earlier today: karabiner-elements.pqrs.org/docs/macos-big-sur

@bosr

It doesn't seem to be working normally. I hope this capture was helpful.

My Mac version is 11.0 beta (20A5354i)

스크린샷 2020-09-10 오전 1 32 58

@Hansanghyeon I'm seeing "Connection refused" with the new DriverKit beta in Big Sur as well. 🙁

I've tried everything I can think of, but not having any luck.

[2020-09-09 12:36:26.942] [info] [grabber] virtual_hid_device_service_client_ connected
[2020-09-09 12:36:26.942] [info] [observer] matching device:
[2020-09-09 12:36:26.942] [info] [observer]   registry_entry_id: 4294971521
[2020-09-09 12:36:26.942] [info] [observer]   manufacturer: pqrs.org
[2020-09-09 12:36:26.942] [info] [observer]   product: Karabiner DriverKit VirtualHIDKeyboard 1.0.0
[2020-09-09 12:36:26.942] [info] [observer]   vendor_id: 5824
[2020-09-09 12:36:26.942] [info] [observer]   product_id: 10203
[2020-09-09 12:36:26.942] [info] [observer]   location_id: 0x0
[2020-09-09 12:36:26.942] [info] [observer]   serial_number: pqrs.org:Karabiner-DriverKit-VirtualHIDKeyboard
[2020-09-09 12:36:26.944] [info] [observer]   is_keyboard: true
[2020-09-09 12:36:26.946] [info] [observer]   is_pointing_device: false
[2020-09-09 12:36:26.946] [info] [observer] rescan devices...
[2020-09-09 12:36:26.951] [info] [observer] Karabiner DriverKit VirtualHIDKeyboard 1.0.0 (device_id:4294971521) is observed.
[2020-09-09 12:36:27.634] [info] [observer] device_id:4294971521 is terminated.
[2020-09-09 12:36:27.637] [info] [observer] rescan devices...
[2020-09-09 12:36:27.937] [info] [grabber] virtual_hid_device_service_client_ error_occurred: Connection reset by peer
[2020-09-09 12:36:27.938] [info] [grabber] virtual_hid_device_service_client_ closed
[2020-09-09 12:36:27.938] [info] [grabber] virtual_hid_device_service_client_ connect_failed: Connection refused
[2020-09-09 12:36:28.938] [info] [grabber] virtual_hid_device_service_client_ connect_failed: Connection refused

@Hansanghyeon I'm seeing "Connection refused" with the new DriverKit beta in Big Sur as well. 🙁

I've tried everything I can think of, but not having any luck.

[2020-09-09 12:36:26.942] [info] [grabber] virtual_hid_device_service_client_ connected
[2020-09-09 12:36:26.942] [info] [observer] matching device:
[2020-09-09 12:36:26.942] [info] [observer]   registry_entry_id: 4294971521
[2020-09-09 12:36:26.942] [info] [observer]   manufacturer: pqrs.org
[2020-09-09 12:36:26.942] [info] [observer]   product: Karabiner DriverKit VirtualHIDKeyboard 1.0.0
[2020-09-09 12:36:26.942] [info] [observer]   vendor_id: 5824
[2020-09-09 12:36:26.942] [info] [observer]   product_id: 10203
[2020-09-09 12:36:26.942] [info] [observer]   location_id: 0x0
[2020-09-09 12:36:26.942] [info] [observer]   serial_number: pqrs.org:Karabiner-DriverKit-VirtualHIDKeyboard
[2020-09-09 12:36:26.944] [info] [observer]   is_keyboard: true
[2020-09-09 12:36:26.946] [info] [observer]   is_pointing_device: false
[2020-09-09 12:36:26.946] [info] [observer] rescan devices...
[2020-09-09 12:36:26.951] [info] [observer] Karabiner DriverKit VirtualHIDKeyboard 1.0.0 (device_id:4294971521) is observed.
[2020-09-09 12:36:27.634] [info] [observer] device_id:4294971521 is terminated.
[2020-09-09 12:36:27.637] [info] [observer] rescan devices...
[2020-09-09 12:36:27.937] [info] [grabber] virtual_hid_device_service_client_ error_occurred: Connection reset by peer
[2020-09-09 12:36:27.938] [info] [grabber] virtual_hid_device_service_client_ closed
[2020-09-09 12:36:27.938] [info] [grabber] virtual_hid_device_service_client_ connect_failed: Connection refused
[2020-09-09 12:36:28.938] [info] [grabber] virtual_hid_device_service_client_ connect_failed: Connection refused

same here

Same here:
image

image

I just upgraded to beta 6. I've rebooted the computer, unloaded, and re-loaded the extension.

https://karabiner-elements.pqrs.org/docs/macos-big-sur/

Read the important notice. It doesn't work on beta 6

It seems to me that the notice says that it will stop working after a restart, not that it doesn't work at all?

Agreed, I followed the instructions here that come after:

You have to reinstall the driver by the following way every reboot on macOS Big Sur Beta 6.

which I think should mean that it works on beta 6 after following those instructions?

Looks like the driver is crashing?

Process 18425 stopped
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
    frame #0: 0x0000000102552b74 Karabiner-DriverKit-VirtualHIDDeviceClient`pqrs::dispatcher::extra::dispatcher_client::enqueue_to_dispatcher(std::__1::function<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > >) const + 20
Karabiner-DriverKit-VirtualHIDDeviceClient`pqrs::dispatcher::extra::dispatcher_client::enqueue_to_dispatcher:
->  0x102552b74 <+20>: ldr    x0, [x0, #0x10]
    0x102552b78 <+24>: cbz    x0, 0x102552bb8           ; <+88>
    0x102552b7c <+28>: mov    x20, x2
    0x102552b80 <+32>: mov    x21, x1
Target 0: (Karabiner-DriverKit-VirtualHIDDeviceClient) stopped.
(lldb) bt
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
  * frame #0: 0x0000000102552b74 Karabiner-DriverKit-VirtualHIDDeviceClient`pqrs::dispatcher::extra::dispatcher_client::enqueue_to_dispatcher(std::__1::function<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > >) const + 20
    frame #1: 0x000000010257424c Karabiner-DriverKit-VirtualHIDDeviceClient`io_service_client::async_virtual_hid_pointing_ready() + 64
    frame #2: 0x0000000102573d6c Karabiner-DriverKit-VirtualHIDDeviceClient`pqrs::dispatcher::extra::timer::call_function(int) + 76
    frame #3: 0x0000000102526ebc Karabiner-DriverKit-VirtualHIDDeviceClient`pqrs::dispatcher::dispatcher::dispatcher(std::__1::weak_ptr<pqrs::dispatcher::time_source>)::'lambda'()::operator()() const + 488
    frame #4: 0x0000000102526c5c Karabiner-DriverKit-VirtualHIDDeviceClient`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, pqrs::dispatcher::dispatcher::dispatcher(std::__1::weak_ptr<pqrs::dispatcher::time_source>)::'lambda'()> >(void*) + 44
    frame #5: 0x00000001948f50f8 libsystem_pthread.dylib`_pthread_start + 320

Ok, let's break atasync_virtual_hid_pointing_ready:

(lldb) b async_virtual_hid_pointing_ready
Breakpoint 1: where = Karabiner-DriverKit-VirtualHIDDeviceClient`io_service_client::async_virtual_hid_pointing_ready(), address = 0x00000001040f820c
(lldb) c
Process 19000 resuming
Process 19000 stopped
* thread #2, stop reason = breakpoint 1.1
    frame #0: 0x00000001040f820c Karabiner-DriverKit-VirtualHIDDeviceClient`io_service_client::async_virtual_hid_pointing_ready()
Karabiner-DriverKit-VirtualHIDDeviceClient`io_service_client::async_virtual_hid_pointing_ready:
->  0x1040f820c <+0>:  sub    sp, sp, #0x50             ; =0x50 
    0x1040f8210 <+4>:  stp    x20, x19, [sp, #0x30]
    0x1040f8214 <+8>:  stp    x29, x30, [sp, #0x40]
    0x1040f8218 <+12>: add    x29, sp, #0x40            ; =0x40 
Target 0: (Karabiner-DriverKit-VirtualHIDDeviceClient) stopped.

this seems to be nullptr:

(lldb) p $x0
(unsigned long) $0 = 0

If you go up a frame, there's a a test and a load from it (the nullptr check, and the vtable call, from this code apparently) so that must have worked:

(lldb) up
frame #1: 0x00000001040f7d6c Karabiner-DriverKit-VirtualHIDDeviceClient`pqrs::dispatcher::extra::timer::call_function(int) + 76
Karabiner-DriverKit-VirtualHIDDeviceClient`pqrs::dispatcher::extra::timer::call_function:
->  0x1040f7d6c <+76>: ldr    x20, [x19]
    0x1040f7d70 <+80>: adr    x8, #0x19790              ; vtable for std::__1::__function::__func<pqrs::dispatcher::extra::timer::call_function(int)::'lambda'(), std::__1::allocator<pqrs::dispatcher::extra::timer::call_function(int)::'lambda'()>, void ()> + 16
    0x1040f7d74 <+84>: nop    
    0x1040f7d78 <+88>: mov    w9, w21
(lldb) x/10i $pc-16
    0x1040f7d5c: 0xb4000080   cbz    x0, 0x1040f7d6c           ; <+76>
    0x1040f7d60: 0xf9400008   ldr    x8, [x0]
    0x1040f7d64: 0xf9401908   ldr    x8, [x8, #0x30]
    0x1040f7d68: 0xd63f0100   blr    x8
->  0x1040f7d6c: 0xf9400274   ldr    x20, [x19]
    0x1040f7d70: 0x100cbc88   adr    x8, #0x19790              ; vtable for std::__1::__function::__func<pqrs::dispatcher::extra::timer::call_function(int)::'lambda'(), std::__1::allocator<pqrs::dispatcher::extra::timer::call_function(int)::'lambda'()>, void ()> + 16
    0x1040f7d74: 0xd503201f   nop    
    0x1040f7d78: 0x2a1503e9   mov    w9, w21
    0x1040f7d7c: 0xa900cfe8   stp    x8, x19, [sp, #0x8]
    0x1040f7d80: 0x910023f5   add    x21, sp, #0x8             ; =0x8 

So I would guess a missing lock?

@saagarjha Thank you for feedback!
I released new version (12.93.0) which fixed a bug. Please confirm it.
https://karabiner-elements.pqrs.org/docs/macos-big-sur/

Guess who can't read? Yep, it's me. Thanks for finding the actual fix, @tekezo :P 12.93.0 is looking good from my side; I'm glad to have Karabiner back :)

@saagarjha Thank you for feedback!
I released new version (12.93.0) which fixed a bug. Please confirm it.
https://karabiner-elements.pqrs.org/docs/macos-big-sur/

Confirming it works on Beta 8 6. Thanks!!!!!

Beta 8

Do you mean beta 6, or…

Beta 8

Do you mean beta 6, or…

Beta 6 yeah, sorry, too excited!

Thanks for the release, I can confirm this works on Big Sur beta 6 also 🏅

Initially I got a "something went wrong" error when trying to open the Security & Privacy prefpane to allow access.
After jumping through some hoops I got it running.

The hoops, for future travellers:

  • Install Karabiner
  • Try to open Security & Privacy pref pane
  • error
  • Open Karabiner preferences
  • click deactivate driver
  • Open Security & Privacy pref pane
  • (no error)
  • Leave pref pane open
  • Click Activate in Karabiner preferences
  • Click allow in lower part of pref pane
  • Karabiner dialog disappears
  • Karabiner now working again 😌

🎉🎉🎉🎉 aaahhh it's so nice to have karabiner back finally!

Also working on Catalina and seems to have fixed this issue where the system would hang when shutting down or restarting

@tekezo On the latest beta (7), Karabiner-Elements reloads without a problem on reboot. 🥳

Hi, should I clone this repo and build from source for now, or should I download v12.10.0? I'm on Big Sur beta 7.

Thank y'all for the great work btw!

Use version 12.93.0 posted above.

Edit: there's a 12.94.0, use that

Hi, you can get the link to the beta here above: https://github.com/pqrs-org/Karabiner-Elements/issues/2331#issuecomment-689890790

Thank you! @saagarjha @bosr

For me, @gondalez solution worked because I (1) uninstalled all traces of Karabiner, (2) THEN opened Security and Privacy AND LEFT IT OPEN, (3) installed Karabiner 12.95.0. Previously, if the Sec and Priv was not already open, the Karabiner installation would fail because opening Sec and Priv crashed.

On Big Sur Beta 8, I needed to open Karabiner, check for beta updates, install, and that was it. Everything worked!

Oh and not sure if it's related, but if your on board keyboard is unresponsive, reset the PRAM (Cmd + Opt + P + R) and you're good to go. Yay. Everything seems to work. Even after reboot.

EDIT: Although after an update, you need to do the above steps from @gondalez again.

Just upgraded to 11.0.1. My observation is that karabiner somehow completely disables the internal keyboard on macbook pro A1704. External keyboard works fine. I wasn't able to get the internal keyboard back running with karabiner. So I just temporarily removed karabiner's entries from the LaunchAgents directory. Upgrading major versions of mac os is always such a big pain..... Still remember clearly how sierra bloodily killed the original karabiner...

Was this page helpful?
0 / 5 - 0 ratings