Configuration
The Kanata configuration is located at.config/kanata/config.kbd. It uses a Lisp-like syntax to define key mappings and behaviors.
Tap-hold configuration
The configuration implements tap-hold functionality where a single key performs different actions based on whether it’s tapped or held:.config/kanata/config.kbd
The
tap-hold syntax is (tap-hold tap-timeout hold-timeout tap-action hold-action). Both timeouts are set to 100ms in this configuration.Key mappings
The configuration remaps the Caps Lock key to:- Tap: Backspace
- Hold: Left Control
Systemd service setup
Kanata runs as a systemd user service to start automatically and handle keyboard input at the system level.Service configuration
The service file is located at.config/systemd/user/kanata.service:
.config/systemd/user/kanata.service
Enable and start the service
After installing the dotfiles with Stow, enable and start the Kanata service:Performance tuning
The service file includes commented-out options for increasing process priority if you encounter input lag on resource-constrained systems:Troubleshooting
Service fails to start
Service fails to start
Check the service logs:Common issues:
- Kanata binary not in PATH
- Config file syntax errors
- Insufficient permissions to access input devices
Key mappings not working
Key mappings not working
- Verify the service is running:
systemctl --user status kanata.service - Check for config file syntax errors in the logs
- Ensure no other keyboard remappers are running (xcape, xmodmap, etc.)
Input lag or delayed response
Input lag or delayed response
- Try adjusting the tap-hold timeout values in the config
- Consider enabling the performance tuning options
- Check system resource usage
Related resources
Systemd services
Learn more about managing systemd user services
Kanata GitHub
Official Kanata documentation and examples