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, ... }:
let
disable = [
apps = [
"gimp-*"
"steam-proton"
];
keys = [
"escape"
"leftcontrol"
];
in
{
file = (pkgs.formats.ini { }).generate "KeydDisableConfig" (
builtins.listToAttrs (builtins.map (app:
{
builtins.listToAttrs (
builtins.map (app: {
name = app;
value = {
"capslock" = "capslock";
"escape" = "escape";
"leftcontrol" = "leftcontrol";
};
}
) disable)
value = builtins.listToAttrs (
builtins.map (key: {
name = key;
value = key;
}) keys
);
}) apps
)
);
}