You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Mac上替代AutoHotkey按键发送脚本?

替代方案:Karabiner-Elements

这是Mac上最贴合你需求的工具,完全能实现类似AutoHotkey的全局热键映射功能,满足后台监听、全应用生效、开机自启的要求。

配置步骤

  1. 安装Karabiner-Elements:从官方渠道下载安装完成后,按照引导完成辅助功能权限授权(这是全局监听按键的必要条件)。
  2. 自定义热键映射
    • 打开终端,编辑Karabiner的核心配置文件:
      open ~/.config/karabiner/karabiner.json
      
    • 在profiles数组下的complex_modifications字段中,添加自定义规则(如果没有该字段,自行创建):
      "complex_modifications": {
        "rules": [
          {
            "description": "Command+a 输入 ä",
            "manipulators": [
              {
                "type": "basic",
                "from": {
                  "key_code": "a",
                  "modifiers": {
                    "mandatory": ["left_command"]
                  }
                },
                "to": [
                  {
                    "text": "ä"
                  }
                ]
              }
            ]
          }
        ]
      }
      
    • 保存配置文件后,Karabiner会自动加载新规则,无需重启。
  3. 设置开机自启:打开Karabiner-Elements的「Settings」面板,找到「Launch at login」选项并勾选即可。

补充说明

  • 如需添加更多类似热键(比如Command+o输入ö),只需在rules数组中添加新的manipulators对象即可。
  • 规则中的left_command对应Mac左侧Command键(即你习惯的Windows Win键),若要支持左右两侧Command键,可将mandatory的值改为["command"]。

内容的提问来源于stack exchange,提问作者Patrick Rode

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.25 20:37:09