Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
layerkey
========
A simple utility that allows you to easily configure a second keyboard layer
and generate a corresponding `.json` file to use with Karabiner-Elements.
Installation
------------
In the project root, run:
make install
This will install layerkey to `~/.local/bin/` and create a config directory
in `~/.config/layerkey/`.
Usage
-----
Edit the configuration file in `~/.config/layerkey/config` then run:
layerkey <key code>
where `<key code>` is the key code of the key that should activate the layer,
for example `grave_accent_and_tilde`.
If you don't know the key code, open Karabiner-EventViewer and press the key.
If the command is not found then `~/.local/bin/` might not be in your `$PATH`,
in that case, add it:
export PATH="$PATH:$HOME/.local/bin"
This will create a file `~/.config/layerkey/layer.json`.
To add it to Karabiner-Elements:
1. Open Karabiner-Elements
2. Navigate to 'Complex Modifications'
3. Select 'Add your own rule'
4. Copy and paste the contents of `~/.config/layerkey/layer.json`
Configuration
-------------
Simply replace the character you want to remap with the character you want
to remap it to. Here is an example of what a config might look like:
,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | |
|---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
| | q | < | > | - | + | ^ | { | } | o | p | | | |
|-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
| | ! | * | / | _ | = | h | ( | ) | l | | | |
|------'-,-'-,-'-,-'-+-'-,-'-,-'-+-'-,-'-,-'-,-'-,-'------,-'
| | z | x | c | v | b | [ | ] | | | | |
|---,----',--'--,'---'---'---'---'---',--'--,'---'------,-'
| | | | | | | |
'---'-----'-----'---------------------'-----'----'------'
**NOTE**: DO NOT ADD OR REMOVE ANY WHITESPACE
Unfortunately only alphanumeric keys can be remapped at the moment.