-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkeyboard.nix
More file actions
105 lines (92 loc) · 2.34 KB
/
keyboard.nix
File metadata and controls
105 lines (92 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{ pkgs, ... }:
{
# use xkb config for tty, early for luks prompt
console = {
useXkbConfig = true;
earlySetup = true;
};
services = {
# colemak-dh keyboard layout xkb
xserver.xkb = {
layout = "us";
variant = "colemak_dh_iso";
};
keyd = {
enable = true;
# remaps are based on colemak-dh,
# but the config is on qwerty so some combos won't make much sense
keyboards.default.settings = {
main = {
a = "overloadt(alt, a, 200)";
s = "overloadt(meta, s, 200)";
d = "overloadt(shift, d, 200)";
f = "overloadt(control, f, 200)";
g = "altgr";
j = "overloadt(control, j, 200)";
k = "overloadt(shift, k, 200)";
l = "overloadt(meta, l, 200)";
";" = "overloadt(alt, ;, 200)";
# Brightness
f1 = "brightnessdown";
f2 = "brightnessup";
# Media
f7 = "previoussong";
f8 = "playpause";
f9 = "nextsong";
# Volume
f10 = "mute";
f11 = "volumedown";
f12 = "volumeup";
# Chords
"w+e" = "esc";
"i+o" = "backspace";
"z+x" = "tab";
"comma+dot" = "enter";
space = "overloadt(extend, space, 200)";
};
extend = {
q = "esc";
w = "tab";
# e = "";
# r = "";
# t = "";
# y = "";
# u = "";
i = "up";
# o = "";
# p = "";
a = "alt";
s = "meta";
d = "shift";
f = "control";
g = "altgr";
h = "backspace";
j = "left";
k = "down";
l = "right";
";" = "enter";
# reset fkeys
f1 = "f1";
f2 = "f2";
f3 = "f3";
f4 = "f4";
f5 = "f5";
f6 = "f6";
f7 = "f7";
f8 = "f8";
f9 = "f9";
f10 = "f10";
f11 = "f11";
f12 = "f12";
};
};
};
};
# fix for internal keyboards blocking touchpad 'disable-while-typing' action, when using keyd
environment.etc."libinput/local-overrides.quirks".text = pkgs.lib.mkForce ''
[Serial Keyboards]
MatchUdevType=keyboard
MatchName=keyd*keyboard
AttrKeyboardIntegration=internal
'';
}