<commit_before>[![Build Status](https://travis-ci.org/pqrs-org/KE-complex_modifications.svg?branch=master)](https://travis-ci.org/pqrs-org/KE-complex_modifications)

# KE-complex_modifications

complex_modifications for Karabiner-Elements.

https://pqrs.org/osx/karabiner/complex_modifications/

## Update docs

Run make in terminal.

```
make
```

## Add rules

1. Put a file to [src/json](https://github.com/pqrs-org/KE-complex_modifications/tree/master/src/json). (or [docs/json](https://github.com/pqrs-org/KE-complex_modifications/tree/master/docs/json) directly)
2. Add `file_import_panel` to [src/index.html.erb](https://github.com/pqrs-org/KE-complex_modifications/tree/master/src/index.html.erb).
3. Run `make` in terminal.

Key name definitions are [here](https://github.com/tekezo/Karabiner-Elements/blob/master/src/apps/PreferencesWindow/PreferencesWindow/Resources/simple_modifications.json).

## Local testing

1. Copy a json file to `~/.config/karabiner/assets/complex_modifications`.
2. Import rules from Karabiner-Elements Preferences.

### Example

```
$ cp docs/json/caps_lock.json ~/.config/karabiner/assets/complex_modifications<commit_msg>add modifier keys documentation in README<commit_after>[![Build Status](https://travis-ci.org/pqrs-org/KE-complex_modifications.svg?branch=master)](https://travis-ci.org/pqrs-org/KE-complex_modifications)

# KE-complex_modifications

complex_modifications for Karabiner-Elements.

https://pqrs.org/osx/karabiner/complex_modifications/

## Update docs

Run make in terminal.

```
make
```

## Add rules

1. Put a file to [src/json](https://github.com/pqrs-org/KE-complex_modifications/tree/master/src/json). (or [docs/json](https://github.com/pqrs-org/KE-complex_modifications/tree/master/docs/json) directly)
2. Add `file_import_panel` to [src/index.html.erb](https://github.com/pqrs-org/KE-complex_modifications/tree/master/src/index.html.erb).
3. Run `make` in terminal.

Key name definitions are [here](https://github.com/tekezo/Karabiner-Elements/blob/master/src/apps/PreferencesWindow/PreferencesWindow/Resources/simple_modifications.json). 

In the `"from"` section of the JSON files, you can use `command`, `option`, `shift`, `control` etc. instead of `left_command`, `left_option`, `left_shift` and `left_control` to refer to both the left and right modifier keys.

## Local testing

1. Copy a json file to `~/.config/karabiner/assets/complex_modifications`.
2. Import rules from Karabiner-Elements Preferences.

### Example

```
$ cp docs/json/caps_lock.json ~/.config/karabiner/assets/complex_modifications
{'fraction_non_alphanumeric': 0.14668218859138532, 'fraction_numerical': 0.0038804811796662787, 'mean_word_length': 5.152744630071599, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1805266', 'n_tokens_mistral': 883, 'n_tokens_neox': 853, 'n_words': 155}