mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-13 02:02:56 +00:00
1c9bd21ced
helps prevent escape key from being sent if not tapped
43 lines
970 B
Nix
43 lines
970 B
Nix
{ config, pkgs, ... }: {
|
|
|
|
config = {
|
|
|
|
services.xserver = {
|
|
|
|
layout = "us";
|
|
|
|
# Keyboard responsiveness
|
|
autoRepeatDelay = 250;
|
|
autoRepeatInterval = 40;
|
|
|
|
};
|
|
|
|
# Use capslock as escape and/or control
|
|
services.keyd = {
|
|
enable = true;
|
|
keyboards = {
|
|
default = {
|
|
ids = [ "*" ];
|
|
settings = {
|
|
main = { capslock = "overload(control, esc)"; };
|
|
|
|
# Fix: ctrl-click sends escape afterwards
|
|
# Suppresses escape if held for more than 500ms
|
|
# https://github.com/rvaiya/keyd/issues/424
|
|
global = { overload_tap_timeout = 500; };
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
# For some reason, keyd doesn't restart properly when updating
|
|
system.activationScripts.keyd.text =
|
|
"${pkgs.systemd}/bin/systemctl restart keyd.service";
|
|
|
|
# Enable num lock on login
|
|
home-manager.users.${config.user}.xsession.numlock.enable = true;
|
|
|
|
};
|
|
|
|
}
|