Last active
August 21, 2022 20:41
-
-
Save justinmklam/e5f540b350289f8d263c9bbad3436212 to your computer and use it in GitHub Desktop.
Remap capslock to ctrl when held, escape when pressed (for Linux). Source: https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Swapping_Caps_Lock_with_Left_Control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install xcape (https://github.com/alols/xcape) | |
sudo pacman -S xcape | |
# Add the following to ~/.xprofile so they're executed at startup (since these commands don't persist across sessions) | |
setxkbmap -option caps:ctrl_modifier # Set capslock to ctrl when held | |
xcape -e 'Caps_Lock=Escape' # Set capslock to escape when pressed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment