-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.toml
70 lines (60 loc) · 3.58 KB
/
config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Example Dvorak layout configuration with comments.
# Layer to be used when no modifier key is pressed.
base_layer = "base"
# Associates the caps lock key and indicator light with a layer.
# Especially useful when the caps lock key is remapped and you accidentally use it
# from a program running with admin rights (where kbremap does not work).
caps_lock_layer = "shift"
# Uncomment to disable the caps lock indicator entirely (even when enabled externally,
# e.g. pressing the caps lock key when an elevated window has focus).
# Disables the `VK_CAPITAL` virtual key. Layers can still be locked with the `lock` target.
# To actually disable locking, comment out the `lock` target on the base layer.
# The "unreachable" layer is defined at the end of the file.
#caps_lock_layer = "unreachable"
[layers]
# A layer is a collection of mappings where each mapping consists of a *source* (`scan_code`) and a
# *target* (e.g. characters, modifiers keys, ...).
#
# Scan codes are used as source to specify the behaviour of a physical key on the keyboard.
# Reference: <https://upload.wikimedia.org/wikipedia/commons/3/34/Ps2_de_keyboard_scancode_set_1.svg>
#
# Scan codes without explicit mapping will use the default Windows layout to translate
# a key press to a [virtual key code](https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes).
#
# Use the debug output to observe scan code (sc) and virtual key code (vk) information while
# pressing keys. To see the debug output either run kbremap from the command line or enable the
# console output from the tray icon menu.
base = [
# The `characters` target remaps multiple keys to (Unicode) characters.
# The first key to be mapped is specifed by `scan_code`. The scan code is incremented by one
# for each character, which means each key is mapped one character of the `characters` string.
# Simulates a virtual key press if the target character exists on the active Windows layout
# so that keyborad shortcuts (e.g. Ctrl+a) continue to work as expected. Injects a Unicode
# symbol if the target character is not available on the active Windows layout.
{ scan_code = 0x02, characters = "1234567890[]" },
{ scan_code = 0x10, characters = "',.pyfgcrl/=\\" },
{ scan_code = 0x1E, characters = "aoeuidhtns-" },
{ scan_code = 0x2C, characters = ";qjkxbmwvz" },
# The `layer` target switches to another virtual layer.
# Ignores the original scan code if no `virtual_key` is specified.
{ scan_code = 0x2A, layer = "shift", virtual_key = 0xA0 }, # left shift
{ scan_code = 0xE036, layer = "shift", virtual_key = 0xA1 }, # right shift
# The `lock` target locks the layer until the same key is pressed again.
{ scan_code = 0x3A, lock = "shift" }, # caps lock
# The `virtual_keys` works similar to the `characters` target but takes a collection of virtual keys.
# An empty target can be used to ignore scan codes.
{ scan_code = 0x021D, virtual_keys = [] }, # ignore additional scan code from `Alt Gr`
# Emoji Keys!
# { scan_code = 0x29, characters = "🚀" }, # `~` on US layout, `^` on german layout
]
shift = [
{ scan_code = 0x02, characters = "!@#$%^&*(){}" },
{ scan_code = 0x10, characters = "\"<>PYFGCRL?+|" },
{ scan_code = 0x1E, characters = "AOEWIDHTNS_" },
{ scan_code = 0x2C, characters = ":QJKXBMWVZ" },
# Revert active caps lock with shift keys
{ scan_code = 0x2A, layer = "base", virtual_key = 0xA0 }, # left shift
{ scan_code = 0xE036, layer = "base", virtual_key = 0xA1 }, # right shift
]
# A dummy layer not referenced by any layer key action.
unreachable = []