diff options
| author | Michael Hoang <Enzime@users.noreply.github.com> | 2024-08-06 08:00:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-06 08:00:07 +0200 |
| commit | 91010a5613ffd7ee23ee9263213157a1c422b705 (patch) | |
| tree | bdf0349b0a7937041fa601db3e997d27e21f5de4 /modules/system | |
| parent | f7142b8024d6b70c66fd646e1d099d3aa5bfec49 (diff) | |
| parent | 636d1a09d8a4fc2306aee0c8a33dac21bd9e201a (diff) | |
Merge pull request #1023 from malko42/swap-ctrl-fn
(feature) Add swapLeftCtrlAndFn
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/keyboard.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/system/keyboard.nix b/modules/system/keyboard.nix index 01e2525..f4f6406 100644 --- a/modules/system/keyboard.nix +++ b/modules/system/keyboard.nix @@ -38,6 +38,12 @@ in description = "Whether to swap the left Command key and left Alt key."; }; + system.keyboard.swapLeftCtrlAndFn = mkOption { + type = types.bool; + default = false; + description = "Whether to swap the left Control key and Fn (Globe) key."; + }; + system.keyboard.userKeyMapping = mkOption { internal = true; type = types.listOf (types.attrsOf types.int); @@ -66,6 +72,14 @@ in HIDKeyboardModifierMappingSrc = 30064771298; HIDKeyboardModifierMappingDst = 30064771299; }) + (mkIf cfg.swapLeftCtrlAndFn { + HIDKeyboardModifierMappingSrc = 30064771296; + HIDKeyboardModifierMappingDst = 1095216660483; + }) + (mkIf cfg.swapLeftCtrlAndFn { + HIDKeyboardModifierMappingSrc = 1095216660483; + HIDKeyboardModifierMappingDst = 30064771296; + }) ]; system.activationScripts.keyboard.text = optionalString cfg.enableKeyMapping '' |
