Keyd: Disable some keys in Gimp and games.

This commit is contained in:
Dmitry Voronin 2024-10-15 03:08:33 +03:00
parent 86e422dbf7
commit 493ef5ae02
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -1,19 +1,27 @@
{ pkgs, ... }: { pkgs, ... }:
let let
disable = [ apps = [
"gimp-*"
"steam-proton"
];
keys = [
"escape"
"leftcontrol"
]; ];
in in
{ {
file = (pkgs.formats.ini { }).generate "KeydDisableConfig" ( file = (pkgs.formats.ini { }).generate "KeydDisableConfig" (
builtins.listToAttrs (builtins.map (app: builtins.listToAttrs (
{ builtins.map (app: {
name = app; name = app;
value = { value = builtins.listToAttrs (
"capslock" = "capslock"; builtins.map (key: {
"escape" = "escape"; name = key;
"leftcontrol" = "leftcontrol"; value = key;
}; }) keys
} );
) disable) }) apps
)
); );
} }