chromebook-linux/cros-keyboard-map/keyd/examples/capslock-escape-with-vim-mode.conf
2025-06-08 19:32:41 -05:00

38 lines
836 B
Text

# NOTE: to use this, rename this file to default.conf and put in /etc/keyd/
# Advanced use of capslock as a triple function key:
#
# - when 'capslock' is tapped (pressed + released), it behaves as ESC key
#
# - when 'capslock' is held, and used in combination with another key, it
# behaves like a 'ctrl' key modifier (just like xcape)
#
# - when 'capslock' is held, and the 'space' key is tapped, we enter a 3rd
# state for "VIM mode" where hjkl keys become arrow keys until capslock
# is released.
#
[ids]
*
[main]
capslock = overload(ctrl_vim, esc)
# ctrl_vim modifier layer; inherits from 'Ctrl' modifier layer
[ctrl_vim:C]
space = swap(vim_mode)
# vim_mode modifier layer; also inherits from 'Ctrl' modifier layer
[vim_mode:C]
h = left
j = down
k = up
l = right
# forward word
w = C-right
# backward word
b = C-left