Remap caps key to function as left-side return key.
- Shell 100%
| caps-remap | ||
| caps-remap-resume | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
caps-remap
Remap Caps Lock to Enter on Void Linux using setxkbmap.
Install
sudo ./install.sh
This installs:
caps-remapscript to/usr/local/bin/caps-remap-resumehook to/usr/libexec/elogind/system-sleep/(fixes suspend/resume)- Adds
setxkbmapline to~/.xprofilefor session persistence
Usage
caps-remap # Apply the remap (default)
caps-remap apply # Apply the remap
caps-remap remove # Clear xkb option overrides
caps-remap status # Check if the remap is active
How it works
Uses setxkbmap -option caps:enter to remap Caps Lock to Enter at the X keyboard level.
Persistence
- X session start: The install script adds the command to
~/.xprofile, which is sourced by display managers (LightDM, etc.) and can be sourced from~/.xinitrcforstartxusers. - Suspend/resume: An elogind sleep hook is installed to
/usr/libexec/elogind/system-sleep/caps-remap-resume. This hook runs after waking from suspend and re-applies the keyboard mapping.
Requirements
setxkbmap(usually installed with X11)elogind(for suspend/resume hook support)
Uninstall
sudo rm /usr/local/bin/caps-remap
sudo rm /usr/libexec/elogind/system-sleep/caps-remap-resume
Remove the # caps-remap block from ~/.xprofile.