mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-31 04:04:45 +00:00
keyboard: add test for keyboard mappings
This commit is contained in:
parent
d05229ca0d
commit
5303f80542
2 changed files with 17 additions and 0 deletions
|
@ -96,6 +96,7 @@ let
|
||||||
tests.nixpkgs-overlays = makeTest ./tests/nixpkgs-overlays.nix;
|
tests.nixpkgs-overlays = makeTest ./tests/nixpkgs-overlays.nix;
|
||||||
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;
|
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;
|
||||||
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
||||||
|
tests.system-keyboard-mapping = makeTest ./tests/system-keyboard-mapping.nix;
|
||||||
tests.system-packages = makeTest ./tests/system-packages.nix;
|
tests.system-packages = makeTest ./tests/system-packages.nix;
|
||||||
tests.system-path-bash = makeTest ./tests/system-path-bash.nix;
|
tests.system-path-bash = makeTest ./tests/system-path-bash.nix;
|
||||||
tests.system-path-fish = makeTest ./tests/system-path-fish.nix;
|
tests.system-path-fish = makeTest ./tests/system-path-fish.nix;
|
||||||
|
|
16
tests/system-keyboard-mapping.nix
Normal file
16
tests/system-keyboard-mapping.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
system.keyboard.enableKeyMapping = true;
|
||||||
|
system.keyboard.remapCapsLockToControl = true;
|
||||||
|
system.keyboard.remapCapsLockToEscape = true;
|
||||||
|
|
||||||
|
test = ''
|
||||||
|
echo checking keyboard mappings in /activate >&2
|
||||||
|
grep "hidutil property --set '{\"UserKeyMapping\":.*}'" ${config.out}/activate
|
||||||
|
grep "\"HIDKeyboardModifierMappingSrc\":30064771129" ${config.out}/activate
|
||||||
|
grep "\"HIDKeyboardModifierMappingDst\":30064771296" ${config.out}/activate
|
||||||
|
grep "\"HIDKeyboardModifierMappingDst\":30064771113" ${config.out}/activate
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue