Karabiner-Elements README

The project's README from github.com/pqrs-org/Karabiner-Elements. As one markdown file: README.md.

Build Status License

Karabiner-Elements

Karabiner-Elements is a powerful key remapper for macOS.

Download

You can download Karabiner-Elements from the official site.

Alternatively, if you use Homebrew, you can install Karabiner-Elements with brew install --cask karabiner-elements.

Old releases

You can download previous versions of Karabiner-Elements from the release notes.

Supported systems

Usage

Documentation can be found here: https://karabiner-elements.pqrs.org/docs/

Donations

If you would like to support Karabiner-Elements development financially, donations can be made at https://karabiner-elements.pqrs.org/docs/pricing/.


For developers

System requirements to build Karabiner-Elements

How to build the package

Step 1: Get the source code

Get the source code by running the following commands in Terminal.app.

git clone --depth 1 https://github.com/pqrs-org/Karabiner-Elements.git
cd Karabiner-Elements
git submodule update --init --recursive --depth 1

Step 2: Prepare code signing identities

Code signing is required for the Karabiner-Elements background services to run. Prepare the appropriate code signing identities for your Apple Developer Program status.

After preparing the code signing identities, run the following command in Terminal.app to get the identity hashes.

security find-identity -v

The output will look like this. The strings such as C3107C61DB3605DA2D4549054B225DAFB1D6FA2D and BD3B995B69EBA8FC153B167F063079D19CCC2834 are identity hashes.

  1) C3107C61DB3605DA2D4549054B225DAFB1D6FA2D "Developer ID Installer: Fumihiko Takayama (G43BCU2T37)"
  2) BD3B995B69EBA8FC153B167F063079D19CCC2834 "Developer ID Application: Fumihiko Takayama (G43BCU2T37)"
  3) C0D6EBFEAD3C0EB6DB91C3514FF647917A0B5112 "Apple Development: Fumihiko Takayama (YVB3SM6ECS)"

Set these values in environment variables as follows. To avoid forgetting these settings, you can add them to your shell configuration file, such as .zshrc.

# Specify the identity hash for Developer ID Application or Apple Development.
export PQRS_ORG_CODE_SIGN_IDENTITY=BD3B995B69EBA8FC153B167F063079D19CCC2834
# Specify the identity hash for Developer ID Installer or Apple Development.
export PQRS_ORG_INSTALLER_CODE_SIGN_IDENTITY=C3107C61DB3605DA2D4549054B225DAFB1D6FA2D

Step 3: Build a package

Build a package by running the following command in Terminal.app.

make package

The make script will create a Karabiner-Elements-VERSION.dmg in the current directory. The package is included in the dmg file.

Step 4: Install the package you built

Open the dmg file and install Karabiner-Elements from the pkg file inside it.

The permissions you grant to Karabiner-Elements, such as background service startup and Accessibility access, are based on the code signing identity. Therefore, if you switch from the officially distributed package to your own build, these permissions become invalid and must be granted again.

macOS System Settings may not update its UI when permissions are invalidated by a signer change. In that case, reset the permissions by following these steps.

  1. Install your package.
  2. In System Settings, disable or remove the following permissions.
    • Disable both of the following background services:
      • Karabiner-Elements Non-Privileged Agents v2
      • Karabiner-Elements Privileged Daemons v2
    • Remove the Accessibility permission.
  3. Restart macOS.
  4. Open Karabiner-Elements and grant the permissions again.

After these steps, the Karabiner-Elements package you built should work.

Note about pre-built binaries and Swift packages

Karabiner-Elements uses some pre-built binaries and Swift packages during the build.

The make package command does not rebuild the pre-built binaries listed above.
These binaries are copied into the distributed package.

Swift packages are resolved by Xcode/SwiftPM from their package repositories during the build. If you want to rebuild or modify them, please follow the instructions for each upstream project.

Karabiner-Elements (pqrs-org/Karabiner-Elements)

Searching Database…

这是什么?Karabiner-Elements 是一款功能强大的 macOS 按键改键工具,可以自定义键盘的行为。
它是 Mac 应用、命令行工具,还是别的什么?它是一个应用,像普通 macOS 应用一样安装到 Mac 上;装好之后就能对整个系统的按键进行重映射。
怎么在 Mac 上装它?从官网下载安装,或者如果你用 Homebrew,运行:brew install --cask karabiner-elements。
除了 Mac,还需要其他东西才能运行吗?不需要——它是独立应用,唯一的要求是 macOS 版本受支持;Homebrew 只是一种可选的安装方式。
它支持哪些 Mac 和 macOS 版本?它支持 macOS 13 Ventura 到 macOS 27 Golden Gate。macOS 26 Tahoe 及之前的版本在 Intel 和 Apple Silicon 芯片的 Mac 上都能运行;macOS 27 则只支持 Apple Silicon 芯片。
它免费吗?免费。Karabiner-Elements 基于 Unlicense(公有领域)开源,完全免费,包括商用。
用它能自定义哪些东西?它是一款改键工具,核心用途就是改变按键的功能——从替换单个按键,到更复杂的自定义键盘行为。具体配置选项可以看官方文档。
Creator
pqrs-org
Size
139 MB
Stars
23K
Age
10y
Commits · 90 Days