keymapper_config/keymapper.conf

72 lines
1.7 KiB
Plaintext

# Guide can be found at: https://github.com/houmain/keymapper
# Find key names at : https://keycode.info/
# Define some aliases
# Alt = AltLeft
# AltGr = AltRight
# Win = Meta
# Define abstract commands
# Alt{Z} >> AltZ
# Win{X} >> WinX
# Define virtual keys
Vim = Virtual1
Ins = Virtual2 # (mostly used as a negative !Ins)
Jump = Virtual3
# Set LED indicator
!Vim (Shift CapsLock) >> Vim $(xset led named "Caps Lock") ^
(Vim Shift CapsLock) >> Vim $(xset -led named "Caps Lock") ^
# Regular remappings
CapsLock >> ContextMenu
# Define Macros
VimI = !Jump !Control (Ins Vim) # Insert mode
VimJ = !Ins !Shift !Control (Jump Vim) # G+commands (jumps)
VimJS = !Ins !Control (Jump Vim) # G+commands (jumps) hold shift
VimN = !Ins !Jump !Shift !Control Vim # Normal mode
VimNS = !Ins !Jump !Control (Vim Shift) # Normal mode hold shift
# Vim insert mode
VimN{I} >> Ins
VimN{A} >> ArrowRight Ins
VimI{Enter} >> Enter Ins
VimI{Escape} >> InsEsc
# Vim jumps
VimN{G} >> Jump
VimJ{Escape} >> Jump
[title="Firefox"]
VimN{U} >> PageUp
VimN{D} >> PageDown
# Search
VimN{Slash} >> Control{F} Ins
VimN{N} >> F3
VimNS{N} >> Shift{F3}
# Jump
VimJ{G} >> Home Jump
VimNS{G} >> Shift End # shift is necessary to avoid the shift+end key combination
[title="KRunner"]
InsEsc >> Ins Escape
# Systemwide Vim mode
[system="Linux"]
VimN{H} >> ArrowLeft
VimN{J} >> ArrowDown
VimN{K} >> ArrowUp
VimN{L} >> ArrowRight
VimN{W} >> Control{ArrowRight}
VimN{B} >> Control{ArrowLeft}
VimN{Backspace} >> ArrowLeft
VimN{Backslash} >> AltLeft{F2} Ins
VimN{X} >> Delete
InsEsc >> Ins
# VIM: let g:neomake_verbose = 3
# vim: commentstring=#\ %s : filetype=keymapper : syntax=conf :
# vim: modelines=2 :