2021-08-24 21:15:21 +02:00
|
|
|
# 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
|
2021-08-25 17:17:16 +02:00
|
|
|
Ins = Virtual2 # (mostly used as a negative !Ins)
|
2021-08-24 22:13:26 +02:00
|
|
|
Jump = Virtual3
|
2021-08-24 21:15:21 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2021-08-25 17:17:16 +02:00
|
|
|
# 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
|
2021-08-24 22:13:26 +02:00
|
|
|
|
2021-08-25 17:17:16 +02:00
|
|
|
# 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
|
2021-08-24 21:15:21 +02:00
|
|
|
|
|
|
|
[title="Firefox"]
|
2021-08-25 17:17:16 +02:00
|
|
|
VimN{U} >> PageUp
|
|
|
|
VimN{D} >> PageDown
|
2021-08-24 21:15:21 +02:00
|
|
|
# Search
|
2021-08-25 17:17:16 +02:00
|
|
|
VimN{Slash} >> Control{F} Ins
|
|
|
|
VimN{N} >> F3
|
|
|
|
VimNS{N} >> Shift{F3}
|
2021-08-24 22:13:26 +02:00
|
|
|
# Jump
|
2021-08-25 17:17:16 +02:00
|
|
|
VimJ{G} >> Home Jump
|
|
|
|
VimNS{G} >> Shift End # shift is necessary to avoid the shift+end key combination
|
2021-08-24 22:13:26 +02:00
|
|
|
|
|
|
|
[title="KRunner"]
|
|
|
|
InsEsc >> Ins Escape
|
2021-08-24 21:15:21 +02:00
|
|
|
|
|
|
|
# Systemwide Vim mode
|
|
|
|
[system="Linux"]
|
2021-08-25 17:17:16 +02:00
|
|
|
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
|
2021-08-24 22:13:26 +02:00
|
|
|
InsEsc >> Ins
|
2021-08-24 21:15:21 +02:00
|
|
|
|
|
|
|
# VIM: let g:neomake_verbose = 3
|
|
|
|
# vim: commentstring=#\ %s : filetype=keymapper : syntax=conf :
|
|
|
|
# vim: modelines=2 :
|