CLI tool
pqrs-org/KE-complex_modifications avatar
pqrs-org/KE-complex_modifications

KE-complex_modifications: the rule pack format behind Karabiner-Elements' key remapping

Karabiner-Elements complex_modifications rules. For example, the "Emacs key bindings" package includes several rule sets for different use cases.

1,477 stars1,169 forksJavaScriptUnlicense

At a glance

What is it?
A look at how pqrs-org structures shared Karabiner-Elements rules, how to contribute your own, and where the format's limitations bite.
Who is it for?
Adopt this repository if you maintain custom Karabiner-Elements rules for yourself or a community: the JSON schema and validation via `make all` give you a structured, testable pipeline. Skip it if you only need a single personal remap and never plan to share: copying one JSON file into `~/.config/karabiner/assets/complex_modifications` is faster than forking and running submodules.
Can I use it commercially?
Yes. Unlicense is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What problem this repository actually solves

The repository is not a tool you install. It is a collection of JSON files and the JavaScript generators that produce them. The primary language listed is JavaScript, because many rule files are generated from `.js` files in `src/json`. The actual product is the `public/json` directory, which is what the website serves. Understanding that distinction matters: you do not run this project, you either consume its output or contribute to it.

The JSON structure: rules inside a bundle

One thing the README does not explain is how the generator files work internally. It says you can put a `.js` file in `src/json` and `make all` will produce the JSON in `public/json`. The implication is that the JavaScript is a template or a builder that outputs the JSON structure. But the README gives no example of such a generator. If you plan to contribute, you either write plain JSON directly into `public/json` or reverse-engineer an existing generator. That is a gap in the documentation. For a simple rule, writing JSON directly is easier. For a rule that needs to be generated from a table of key codes, the generator approach makes sense, but you will have to study existing files to learn the pattern.

Getting your rules in: the contribution workflow

The local test flow is straightforward. Copy the JSON to the assets folder, then import it in Karabiner-Elements. There is also a preview server: `make preview-server` and open `http://localhost:8000`. That lets you see how the rule appears on the website before submitting. The README warns that the preview server does not support hot reload, so you have to refresh manually after editing HTML. That is a minor annoyance but not a blocker. The contribution workflow is designed for a GitHub-based review process, which means your rule is public once merged. If you want a private remap, this is not the place.

Extra descriptions: when one line is not enough

The `groups.json` file is the index that ties everything together. It lists each JSON file path and optionally an extra description path. Without an entry in `groups.json`, your rule will not appear on the site, even if the JSON is valid. The README is clear about this: the HTML file will not be loaded unless you specify `extra_description_path`. So contribution is not just about the JSON; it is about registering it in the index. That is an extra step that can be easy to miss. The README shows the exact JSON5 format for an entry, including a comment for the required `path` field. JSON5 allows comments, which is a small convenience for maintainers.

Validation and its limits: the `make all` gate

Another limitation is that the validation is only as good as the key code list it uses. The error message says `unknown key_code: "space"`. In Karabiner-Elements, the key code for the spacebar is `spacebar`, not `space`. So the validator is enforcing the official key code names. If you use a key code that is valid in a newer version of Karabiner but not in the repository's list, your rule fails. The repository may lag behind Karabiner's own schema. The README does not state how often the key code list is updated. For contributors, that means you should check the existing rules to see which key codes are already used. If you need a very new key, you might have to wait for the repository to update or submit a change to the validator itself.

Maintenance and sync: the cost of staying current

The license is Unlicense, which means the code is public domain. That is permissive: you can use the rules in your own projects without attribution. The README does not discuss licensing implications beyond the license file. Since the rules are JSON data, the Unlicense means you can copy them freely. That is a plus for adoption. The maintainers field gives credit on the site, but legally you are not required to keep it. If you plan to redistribute the rules, you can do so without worry. However, if you contribute, you are placing your work in the public domain, which some developers are uncomfortable with. The README does not highlight this, but it is worth noting before you submit a PR.

Alternatives: writing your own JSON versus using the repository

Another alternative is to use Karabiner-Elements' built-in rule editor, if it exists. The README does not mention one, so we cannot confirm. The Complex Modifications UI allows you to add rules from imported files, but it does not have a visual editor for creating rules from scratch in the standard installation. That is why the JSON format exists. So the real choice is between hand-written JSON and this repository's managed pipeline. The repository adds validation and a web interface, but it also adds a contribution process. If you value correctness and sharing, the repository wins. If you value speed and privacy, direct JSON wins.

Editorial conclusion

Adopt this repository if you maintain custom Karabiner-Elements rules for yourself or a community: the JSON schema and validation via `make all` give you a structured, testable pipeline. Skip it if you only need a single personal remap and never plan to share: copying one JSON file into `~/.config/karabiner/assets/complex_modifications` is faster than forking and running submodules. Before adopting, verify that your rule uses only key codes the validator accepts, and confirm your extra descriptions render correctly with `make preview-server`, since hot reload is not supported.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
Community notes

Community notes