Skip to content

Instantly share code, notes, and snippets.

@XueshiQiao
Last active May 7, 2024 08:43
Show Gist options
  • Save XueshiQiao/b7fc10037bee6c2365227f36857df597 to your computer and use it in GitHub Desktop.
Save XueshiQiao/b7fc10037bee6c2365227f36857df597 to your computer and use it in GitHub Desktop.
Linux_evremap_config
# Config file for evremap (https://github.com/wez/evremap)
# usage:
# sudo target/release/evremap remap /path/to/joey_archlinux.toml
# device_name = "AT Translated Set 2 keyboard"
device_name = "Apple Inc. Magic Keyboard with Touch ID"
# add phys when multiple device_name with same name exists
phys = "usb-0000:02:00.0-6/input1"
# Hold capslock for ctrl, tap for esc
[[dual_role]]
input = "KEY_CAPSLOCK"
hold = ["KEY_FN"]
tap = ["KEY_CAPSLOCK"]
# swap Left Ctrl and Left Meta
[[remap]]
input = ["KEY_LEFTCTRL"]
output = ["KEY_LEFTMETA"]
[[remap]]
input = ["KEY_LEFTMETA"]
output = ["KEY_LEFTCTRL"]
# VIM-like NAVIGATION key remapping
[[remap]]
input = ["KEY_FN", "KEY_H"]
output = ["KEY_LEFT"]
[[remap]]
input = ["KEY_FN", "KEY_L"]
output = ["KEY_RIGHT"]
[[remap]]
input = ["KEY_FN", "KEY_J"]
output = ["KEY_DOWN"]
[[remap]]
input = ["KEY_FN", "KEY_K"]
output = ["KEY_UP"]
# DELETE CHAR
[[remap]]
input = ["KEY_FN", "KEY_I"]
output = ["KEY_BACKSPACE"]
### Skip WORDS BACKWARD / FORWARD
[[remap]]
input = ["KEY_FN", "KEY_Y"]
output = ["KEY_LEFTALT", "KEY_LEFT"]
[[remap]]
input = ["KEY_FN", "KEY_P"]
output = ["KEY_LEFTALT", "KEY_RIGHT"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment