-
Notifications
You must be signed in to change notification settings - Fork 36
Home
Kasper B. Graversen edited this page Dec 20, 2025
·
16 revisions
Welcome to the keymapper wiki!
Here, you can contribute by adding your own examples, documenting unique use cases, and sharing best practices that can benefit the entire community.
Please make edits yourself or suggest additions in the discussions section if you have ideas or feedback.
Homerow Mods (source)
FakeAlt = S | L
FakeControl = D | K
FakeShift = F | J
FakeMeta = A | Semicolon
FakeMeta{Any !Any} >> Meta{Any}
FakeAlt{Any !Any} >> Alt{Any}
FakeControl{Any !Any} >> Control{Any}
FakeShift{Any !Any} >> Shift{Any}
# All combinations of 4
(FakeMeta FakeAlt FakeControl FakeShift){Any !Any} >> (Meta Alt Control Shift){Any}
# All combinations of 3
(FakeMeta FakeAlt FakeControl){Any !Any} >> (Meta Alt Control){Any}
(FakeMeta FakeAlt FakeShift){Any !Any} >> (Meta Alt Shift){Any}
(FakeMeta FakeControl FakeShift){Any !Any} >> (Meta Control Shift){Any}
(FakeAlt FakeControl FakeShift){Any !Any} >> (Alt Control Shift){Any}
# All combinations of 2
(FakeMeta FakeAlt){Any !Any} >> (Meta Alt){Any}
(FakeMeta FakeControl){Any !Any} >> (Meta Control){Any}
(FakeMeta FakeShift){Any !Any} >> (Meta Shift){Any}
(FakeAlt FakeControl){Any !Any} >> (Alt Control){Any}
(FakeAlt FakeShift){Any !Any} >> (Alt Shift){Any}
(FakeControl FakeShift){Any !Any} >> (Control Shift){Any}Alpha = A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Symbol = Backquote | BracketLeft | BracketRight | Comma | Equal | Minus | Period | Semicolon | Slash | Quote
Character = Alpha | Digit | Symbol
Whitespace = Space | Tab | Enter
NumpadDigit = Numpad0 | Numpad1 | Numpad2 | Numpad3 | Numpad4 | Numpad5 | Numpad6 | Numpad7 | Numpad8 | Numpad9
NumpadSymbol = NumpadDivide | NumpadMultiply | NumpadSubtract | NumpadAdd | NumpadEnter | NumpadDecimal
ArrowKey = ArrowUp | ArrowDown | ArrowLeft | ArrowRight
NavigationKey = ArrowKey | Home | End | PageUp | PageDown
FunctionKey = F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12
MouseButton = ButtonLeft | ButtonRight | ButtonMiddle | ButtonBack | ButtonForwardReplace typed shorthand with a longer text or output from a shell command.
# Replace trigger string with the second argument
trigger = ? "$0" >> repeat[Backspace, sub[length["$0"], 1]] $1
# Send typed output
type = $(keymapperctl --type "$0")
# Format date
format_date = $(date +"$0")
[default]
# Email addresses
trigger[":gm", type["[email protected]"]]
trigger[":wm", type["[email protected]"]]
# Timestamps
trigger[":time", type[format_date["%H:%M:%S"]]]
trigger[":dts", type[format_date["%Y-%m-%d-%H-%M"]]]
trigger[":ds", type[format_date["%Y-%m-%d"]]]
# Netmasks
trigger["//24", type["255.255.255.0"]]
trigger["//16", type["255.255.0.0"]]
trigger["//8", type["255.0.0.0"]]
[class = /kitty|xterm|terminal/i]
# Hashbangs
trigger["#bash", type['#!/usr/bin/env bash\n\n']]
trigger["#zsh", type['#!/usr/bin/env zsh\n\n']]Press both shift keys to temporarily type in SCREAMING_SNAKE_CASE. Inspired by QMK's CapsWord feature.
# See "Key group aliases" for definition of Alpha and Digit
CapsWordKey = Alpha | Digit | Minus | Backspace
CapsWord = Virtual
[default]
? (ShiftLeft ShiftRight) >> CapsWord ^
CapsWord >> CapsLock ^ CapsLock
[modifier = "CapsWord"]
Minus >> Shift{Minus} # '_'
CapsWordKey >> CapsWordKey
Any >> CapsWord Any ^Type shifted characters by holding the key down. Inspired by QMK's AutoShift feature.
Tip: Adjust timings to be as short as possible without accidentally triggering autoshifting when typing.
Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
AutoShifted = Backquote | BracketLeft | BracketRight | Comma | Equal | Minus | Period | Semicolon | Slash | Quote
AutoShift = Virtual
[default]
# AutoShift toggle
Control{Shift{Tab}} >> AutoShift ^
[modifier = "!Meta !Alt !Control AutoShift"]
Shift{AutoShifted} >> (Shift AutoShifted)
Digit{140ms} !Digit >> (Shift Digit)
AutoShifted{120ms} !AutoShifted >> (Shift AutoShifted)
AutoShifted{Any} >> AutoShifted Any ^
AutoShifted >> AutoShiftedVimMode = Virtual
VimKey = E
[default]
VimKey{200ms} >> VimMode ^ VimMode
[modifier = "VimMode"]
H >> ArrowLeft
J >> ArrowDown
K >> ArrowUp
L >> ArrowRightHold V down to enable, press V or Escape to disable.
VimMode = Virtual
VimKey = V
[default]
VimKey{200ms} >> VimMode ^
[modifier = "VimMode"]
H >> ArrowLeft
J >> ArrowDown
K >> ArrowUp
L >> ArrowRight
'gg' >> Control{Home}
'G' >> Control{End}
0 >> Home
'^' >> Home
'$' >> End
# Helix (https://helix-editor.com/) variants
'gh' >> Home
'gl' >> End
'ge' >> Control{End}
# Exit VimMode
VimKey >> !VimMode
Escape >> !VimModeUsing CapsLock as an extension key while keeping it's original behavior (source)
ExtMode = Virtual
ExtBypass = Virtual
ExtKey = CapsLock
ExtHold = $0 >> !ExtBypass $1
ExtPrss = $0 >> !ExtBypass $1 ^
ExtTgle = $0 >> !ExtBypass $1 ^ $2
[default]
# Enter ExtMode and ExtBypass states
ExtKey >> ExtMode ExtBypass ^
# If ExtBypass is still enabled: Release states and use the ExtKey default behavior
ExtBypass !ExtKey >> !ExtMode !ExtBypass ExtKey
# If ExtBypass was disabled: Release states and do nothing else
!ExtBypass !ExtKey >> !ExtMode
[modifier = "ExtMode"]
# Any key pressed below will release ExtBypass and disable the original ExtKey behavior.
# Two virtual modifiers ensures that multiple keys can be used while ExtKey is held.
ExtTgle[A, MediaPlayPause, MediaPlayPause]
ExtHold[W, AudioVolumeUp]
ExtHold[S, AudioVolumeDown]
# Optional. Ignore unused combinations. Must be the last one.
ExtPrss[Any]