Move keyboard config to macos default config
This commit is contained in:
parent
e12a2fa2c4
commit
5384cc05cd
2 changed files with 18 additions and 23 deletions
|
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
imports = [
|
||||
../../modules/homebrew.nix
|
||||
../../modules/keyboard.nix
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
];
|
||||
|
||||
|
|
@ -52,4 +51,22 @@
|
|||
echo "Erasing existing Spotlight index..."
|
||||
sudo mdutil -E /
|
||||
'';
|
||||
|
||||
# Key remapping using hidutil via launchd agent
|
||||
# This swaps Control and Caps Lock keys bidirectionally
|
||||
launchd.user.agents.remap-keys = {
|
||||
serviceConfig = {
|
||||
ProgramArguments = [
|
||||
"/usr/bin/hidutil"
|
||||
"property"
|
||||
"--set"
|
||||
''{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0},{"HIDKeyboardModifierMappingSrc":0x7000000E0,"HIDKeyboardModifierMappingDst":0x700000039}]}''
|
||||
];
|
||||
RunAtLoad = true;
|
||||
KeepAlive = false;
|
||||
Label = "org.nixos.remap-keys";
|
||||
StandardErrorPath = "/tmp/remap-keys.err";
|
||||
StandardOutPath = "/tmp/remap-keys.out";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Key remapping using hidutil via launchd agent
|
||||
# This swaps Control and Caps Lock keys bidirectionally
|
||||
|
||||
launchd.user.agents.remap-keys = {
|
||||
serviceConfig = {
|
||||
ProgramArguments = [
|
||||
"/usr/bin/hidutil"
|
||||
"property"
|
||||
"--set"
|
||||
''{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0},{"HIDKeyboardModifierMappingSrc":0x7000000E0,"HIDKeyboardModifierMappingDst":0x700000039}]}''
|
||||
];
|
||||
RunAtLoad = true;
|
||||
KeepAlive = false;
|
||||
Label = "org.nixos.remap-keys";
|
||||
StandardErrorPath = "/tmp/remap-keys.err";
|
||||
StandardOutPath = "/tmp/remap-keys.out";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue