MAC

MacOS Karabiner-Elements不生效解决方法

MacOS 10.14.6 or 14.4

Posted by Yuankun Li on 2020-07-29

每回MacOS一升级,总会遇到Karabiner-Elements不生效的问题,所以统一总结一下

Karabiner-Elements

Karabiner Element,作用是键盘按键改键。

我通常用于把右 Command 和 Capslock 键利用起来,避免快捷键冲突,简单 note,详见sorrycc的《我的快捷键技巧》

  • 右 Command”改成F19: 切换到Complex modifications --> Add rule --> “Change caps_lock to command+control+option+shift.” --> 打开文件~/.config/karabiner/karabiner.jsoncaps_lock替换成right_command
    替换成
  • 我试了后, 把“右 Command”改成F19,发现我右 Command+delete还是经常用的,所以接着在Karabiner Element 的“Simple modifications” 把 “right_option” 改成了 “left_command”。
  • 另外参考Mac 自定义应用程序快捷键配置了Mac app,比如Chrome和iterm3的一些快捷键。免费,开源。

通用解决方法

系统权限保证都设置正确
打开System Settings > Security & Privacy > Privacy

Full Disk Access

  • [x] Karabiner-Elements
    • /Applications/Karabiner-Elements.app
  • [x] karabiner_grabber
    • 路径: /Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_grabber

Input monitoring

  • [x] Karabiner-Eventviewer
    • /Applications/Karabiner-EventViewer.app
  • [x] karabiner_grabber
    • /Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_grabber
  • [x] karabiner_observer
    • /Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_observer

Accessibility

  • [x] karabiner_grabber
    • /Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_grabber
  • [x] karabiner_observer
    • /Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_observer

Allow driver

打开System Settings > Security & Privacy > Security
Allow driver:
https://karabiner-elements.pqrs.org/docs/help/troubleshooting/allow-button-does-not-appear/

重启

重启电脑
多次重启Karabiner-Elements
如果还不成功,就杀进程后重启Karabiner-Elements

1
2
sudo killall karabiner_grabber
sudo killall karabiner_observer

MacOS 14.4.1 Karabiner-Elements不生效

额外把’karabiner_grabber’ full disk access rights makes it work. However, I had to restart Karabiner twice afterwards and 重启电脑.

参考链接:https://github.com/pqrs-org/Karabiner-Elements/issues/3620#issuecomment-1765946996

MacOS 10.14.6 Karabiner-Elements不生效

遇到了macOS 10.14.6 Karabiner-Elements 疑似无法正常使用的问题
参考Does not work on MacOS Catalina #1867

For some reason the permission prompt is not showing up for me when I open Karabiner-EventViewer. And EventViewer says “EventViewer failed to observe keyboard devices”. So I cannot find out a way to use saagarjha’s method as stated above.

  1. add karabiner_grabber and karabiner_observer to “Security & Privacy > Privacy > Accessibility” apps.
  2. And after sudo killall-ing both processes, Karabiner-Elements is working for me again.
1
2
sudo killall karabiner_grabber
sudo killall karabiner_observer

In order to fix, I needed to add the following entries to the Security & Privacy > Privacy > Input Monitoring list:

/Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_grabber
/Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_observer

其他改键工具

Some other tools that should work for you are:

  1. hidutil: macOS-native remapping tool. See MX Keys not active in logi options+ via bluetooth #3082 (comment). Only work for simple modifications
  2. skhd: https://github.com/koekeishiya/skhd.
  3. Hammerspoon or BetterTouchTool.


show git comment