Karabiner-elements: Unload karabiner_grabber when Quitting Karabiner

Created on 23 Jul 2018  Â·  9Comments  Â·  Source: pqrs-org/Karabiner-Elements

Hi, when we quit Karabiner, karabiner_grabber remains loaded. This breaks the use of keyboard logging in MATLAB, so I have to both quit Karabiner, then sudo launchctl unload the karabiner_grabber.plist.

Would it be possible if Karabiner could load/unload karabiner_grabber when starting and stopping?

Thanks for such an amazing utility.

All 9 comments

It seems there is a new daemon karabiner_observer and this also interferes with MATLAB lowlevel keyboard access too, so I need to unload both manually, here are aliased commands to start and stop karabiner for the moment:

alias karabinerLoad='launchctl load /Library/LaunchAgents/org.pqrs.karabiner.karabiner_console_user_server.plist; \
sudo launchctl load /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_grabber.plist; \
sudo launchctl load /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_observer.plist;'
alias karabinerUnload='launchctl unload /Library/LaunchAgents/org.pqrs.karabiner.karabiner_console_user_server.plist; \
sudo launchctl unload /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_grabber.plist; \
sudo launchctl unload /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_observer.plist; \
sudo killall karabiner_grabber; \
sudo killall karabiner_console_user_server; \
sudo killall Karabiner-Menu; \
sudo killall Karabiner-Elements'

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

There is still a significant incompatibility between Karabiner and MATLAB toolboxes used for neuroscience and psychology research...

This is getting worse for me, now I need to also unload the kext — but often the kext fails to unload even if karabiner and all its daemons and services are fully quit...

alias karabinerUnload='launchctl unload -F /Library/LaunchAgents/org.pqrs.karabiner.karabiner_console_user_server.plist; \
    sudo launchctl unload -F /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_grabber.plist; \
    sudo launchctl unload -F /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_observer.plist; \
    sudo killall karabiner_observer; \
    sudo killall karabiner_grabber; \
    sudo killall karabiner_console_user_server; \
    sudo killall Karabiner-Menu; \
    sudo killall Karabiner-Elements; \
    sudo kextunload /Library/Application\ Support/org.pqrs/Karabiner-VirtualHIDDevice/Extensions/org.pqrs.driver.Karabiner.VirtualHIDDevice.v060800.kext;'

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This is still a problem...

Well.........same issue here.

Hi, in recent karabiner-elements, deselecting the keyboard in the preferences:

https://pqrs.org/osx/karabiner/document.html#configuration-devices

...allows the HID keyboard driver to work without issue (MATLAB 2018b), so I think this is the best solution as we just create a profile with keyboard disabled and toggle profile as needed (no need to load/unload kexts manually).

Hi, in recent karabiner-elements, deselecting the keyboard in the preferences:

https://pqrs.org/osx/karabiner/document.html#configuration-devices

...allows the HID keyboard driver to work without issue (MATLAB 2018b), so I think this is the best solution as we just create a profile with keyboard disabled and toggle profile as needed (no need to load/unload kexts manually).

Thanks for your documentation!

I also encountered a similar issue, as setledsmac does not work while the Karabiner's Kext is driving the given keyboard. Using your proposed profile-based approach (temporarily switching to an empty profile via karabiner_cli), everything works flawlessly 🤗

Cheers!

Was this page helpful?
0 / 5 - 0 ratings