From 2c6c123569c1e9b4b227d0843d8bb33f333568c5 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Sat, 21 Dec 2024 13:45:27 +0300 Subject: [PATCH] Keyd: Add OnlyOffice keys. --- home/file/keyd/module/Chromium.nix | 2 +- home/file/keyd/module/DRG.nix | 4 ++-- home/file/keyd/module/Disable.nix | 2 +- home/file/keyd/module/Firefox.nix | 2 +- home/file/keyd/module/Jetbrains.nix | 2 +- home/file/keyd/module/OnlyOffice.nix | 23 +++++++++++++++++++++++ 6 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 home/file/keyd/module/OnlyOffice.nix diff --git a/home/file/keyd/module/Chromium.nix b/home/file/keyd/module/Chromium.nix index bbee7352..ac92c1b4 100644 --- a/home/file/keyd/module/Chromium.nix +++ b/home/file/keyd/module/Chromium.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - file = (pkgs.formats.ini { }).generate "KeydChromiumConfig" { + file = (pkgs.formats.ini { }).generate "keyd-chromium-config" { "chromium-browser" = { "alt.capslock" = "C-t"; # New tab. "alt.x" = "C-w"; # Close tab. diff --git a/home/file/keyd/module/DRG.nix b/home/file/keyd/module/DRG.nix index 90fe6cde..5b9cc568 100644 --- a/home/file/keyd/module/DRG.nix +++ b/home/file/keyd/module/DRG.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { - file = (pkgs.formats.ini { }).generate "KeydDrgConfig" { - steam-app-548430 = { + file = (pkgs.formats.ini { }).generate "keyd-drg-config" { + "steam-app-548430" = { "alt.1" = "macro(enter 10ms L e t ' s 10ms space d o 10ms space t h i s 10ms space T e x a s 10ms space s t y l e ! 10ms enter)"; "alt.2" = "macro(enter 10ms H e c k space y e s ! enter)"; diff --git a/home/file/keyd/module/Disable.nix b/home/file/keyd/module/Disable.nix index b3462b3d..0c2e0791 100644 --- a/home/file/keyd/module/Disable.nix +++ b/home/file/keyd/module/Disable.nix @@ -25,5 +25,5 @@ in value = builtins.listToAttrs keySets; }) apps; in - (pkgs.formats.ini { }).generate "KeydDisableConfig" (builtins.listToAttrs appSets); + (pkgs.formats.ini { }).generate "keyd-disable-config" (builtins.listToAttrs appSets); } diff --git a/home/file/keyd/module/Firefox.nix b/home/file/keyd/module/Firefox.nix index 992cf40e..ecc63dbd 100644 --- a/home/file/keyd/module/Firefox.nix +++ b/home/file/keyd/module/Firefox.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - file = (pkgs.formats.ini { }).generate "KeydFirefoxConfig" { + file = (pkgs.formats.ini { }).generate "keyd-firefox-config" { "firefox-esr" = { "alt.capslock" = "C-t"; # New tab. "alt.x" = "C-w"; # Close tab. diff --git a/home/file/keyd/module/Jetbrains.nix b/home/file/keyd/module/Jetbrains.nix index 80bf821d..7a184c5b 100644 --- a/home/file/keyd/module/Jetbrains.nix +++ b/home/file/keyd/module/Jetbrains.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - file = (pkgs.formats.ini { }).generate "KeydJetbrainsConfig" { + file = (pkgs.formats.ini { }).generate "keyd-jetbrains-config" { "jetbrains-*" = { "alt.b" = "C-f8"; # Toggle line breakpoint. "alt.equal" = "C-A-l"; # Reformat. diff --git a/home/file/keyd/module/OnlyOffice.nix b/home/file/keyd/module/OnlyOffice.nix new file mode 100644 index 00000000..d961ab29 --- /dev/null +++ b/home/file/keyd/module/OnlyOffice.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +{ + file = (pkgs.formats.ini { }).generate "keyd-onlyoffice-config" { + "onlyoffice-desktop-editors" = { + "alt.a" = "home"; + "alt.b" = "pageup"; + "alt.d" = "end"; + "alt.e" = "A-pagedown"; + "alt.f" = "pagedown"; + "alt.h" = "left"; + "alt.i" = "f2"; + "alt.j" = "down"; + "alt.k" = "up"; + "alt.l" = "right"; + "alt.q" = "A-pageup"; + "alt.r" = "C-y"; + "alt.s" = "C-end"; + "alt.u" = "C-z"; + "alt.v" = "S-space"; + "alt.w" = "C-home"; + }; + }; +}