complex_modifications for Karabiner-Elements.
https://pqrs.org/osx/karabiner/complex_modifications/
-
Put a
.rb
(or.erb
) template file into src/json. (Or put a.json
file into docs/json directly.) -
(Optional) Put extra description file into docs/extra_descriptions.
-
Add the following json into docs/groups.json >
files
.{ "path": "json/your_awesome_configuration.json", // required "extra_description_path": "extra_descriptions/your_awesome_configuration.html" // optional },
-
Run
make
command on Terminal.
If you've put.rb
(or.erb
) source file intosrc/json
, formatted json file will be auto generated in thedocs/json/your_awesome_configuration.json
.make
https://pqrs.org/osx/karabiner/json.html
docs/index.html
does not work properly if you open it via file://...
.
Launch a local web server by make server
in terminal and open http://localhost:8000.
(You can quit the local web server by the control-c
shortcut in terminal.)
Before run make server
, make sure you've run make
command to auto generate docs/dist.json
file.
Karabiner-Elements cannot import the json from the local web server due to the no https connection between local web server.
Please import the json via file copy. (See Test your own rules.)
- Copy a json file to
~/.config/karabiner/assets/complex_modifications
.cp docs/json/your_awesome_configuration.json ~/.config/karabiner/assets/complex_modifications
- Import rules from Karabiner-Elements Preferences.
Karabiner-Elements Preferences > Complex Modifications > Rules > Add rule
If you want to publish your own rules into complex_modification repository, follow this step.
-
Fork this repository to your github account.
-
Update or add new rules by following Add rules section. Don't forget to run
make
-
Stage modified files (
git add
) and commit it (git commit
)NOTE : The
make
command will auto generatedocs/dist.json
file. But do not stagedocs/dist.json
file.
(docs/dist.json
file is already ignored by .gitignore) -
Push to your forked repository.
-
Click "New Pull Request" button, then the maintainer will review your commit.
- Put a json file to your site.
- Make a link
karabiner://karabiner/assets/complex_modifications/import?url=<JSON_URL>
. - Open the link from web browser.
Note: You don't need to update the web application if you just want to add new json.
If you want to modify the web application, the source code is in src/vuejs
.
Follow the instruction in src/vuejs/README.md
.