pqrs-org / Karabiner-Elements

Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.
https://pqrs.org/osx/karabiner/
The Unlicense
18.47k stars 828 forks source link

Karabiner completely broken on macOS Big Sur #2331

Open MperorM opened 4 years ago

MperorM commented 4 years ago

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.

cmsj commented 4 years ago

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 :)

saagarjha commented 4 years ago

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.)

scootermafia commented 4 years ago

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

949nb commented 4 years ago

I have a similar problem!!!

hiroshihorie commented 4 years ago

Workaround pls

whymidnight commented 4 years ago

[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.

MperorM commented 4 years ago

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 :)

joshrdavis commented 4 years ago

Any alt for disabling internal keyboard?

b- commented 4 years ago

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…)

jakecast commented 4 years ago

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

saagarjha commented 4 years ago

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

jakecast commented 4 years ago

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

saagarjha commented 4 years ago

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

scootermafia commented 4 years ago

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

chuyeow commented 4 years ago

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.

saagarjha commented 4 years ago

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

hiroshihorie commented 4 years ago

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

chuyeow commented 4 years ago

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.

nickxma commented 4 years ago

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

jakecast commented 4 years ago

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

k-rakestraw commented 4 years ago

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.

jakecast commented 4 years ago

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.

saagarjha commented 4 years ago

Look up.

hologerry commented 4 years ago

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?

munkychop commented 4 years ago

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!)

k-rakestraw commented 4 years ago

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?

zhigang1992 commented 4 years ago

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? 😭

jakecast commented 4 years ago

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.

quantumgolem commented 4 years ago

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...

xyoun commented 4 years ago

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.

quantumgolem commented 4 years ago

@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.

bosr commented 4 years ago

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!

elliotwaite commented 4 years ago

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

vviikk commented 4 years ago

@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.

elliotwaite commented 4 years ago

@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.

ajsharp commented 4 years ago

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

cgao35 commented 4 years ago

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~

ajsharp commented 4 years ago

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

amarsyla commented 4 years ago

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

g3d commented 4 years ago

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

zenwheel commented 4 years ago

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.

vegerot commented 4 years ago

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?

krzysiek33plpl commented 4 years ago

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

ghost commented 4 years ago

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.)

krzysiek33plpl commented 4 years ago

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

K.

gibfahn commented 4 years ago

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

leowu4ever commented 4 years ago

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

nikitavoloboev commented 4 years ago

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

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

johnskiller commented 4 years ago

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?

nikitavoloboev commented 4 years ago

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.