about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWeirdTreeThing <bradyn127@protonmail.com>2023-11-29 13:54:50 -0500
committerWeirdTreeThing <bradyn127@protonmail.com>2023-11-29 13:54:50 -0500
commit9fcc286959c7f2d72f86fbf59533ebc66c4ee775 (patch)
treed1376aa98530aa1eab9f6dbfc7f3a1dd380d69d5
parent3f9e8eafaaa4e2cd68f365a4f4155263810cea6a (diff)
Add special case for pixel devices
-rw-r--r--configs/cros-pixel.conf44
-rwxr-xr-xinstall.sh8
2 files changed, 51 insertions, 1 deletions
diff --git a/configs/cros-pixel.conf b/configs/cros-pixel.conf
new file mode 100644
index 0000000..ce91e39
--- /dev/null
+++ b/configs/cros-pixel.conf
@@ -0,0 +1,44 @@
+[ids]
+# Pixelbook and Pixelbook Go use AT Keyboard (0001:0001)
+# Nocturne uses Google hammer (18d1:5030)
+0001:0001
+18d1:5030
+
+[main]
+f1 = back
+f2 = refresh
+f3 = f11
+f4 = scale
+f5 = brightnessdown
+f6 = brightnessup
+f7 = playpause
+f8 = mute
+f9 = volumedown
+f10 = volumeup
+f13 = f13
+
+[meta]
+f1 = f1
+f2 = f2
+f3 = f3
+f4 = f4
+f5 = f5
+f6 = f6
+f7 = f7
+f8 = f8
+f9 = f9
+f10 = f10
+f13 = f13
+
+
+[alt]
+backspace = delete
+f5 = kbdillumdown
+f6 = kbdillumup
+
+[control]
+f5 = print
+
+
+[control+alt]
+backspace = C-A-delete
diff --git a/install.sh b/install.sh
index b8a76d9..c7f6fcd 100755
--- a/install.sh
+++ b/install.sh
@@ -64,7 +64,13 @@ if ! [ -f /usr/bin/keyd ]; then
 fi
 
 echo "Generating config"
-python3 cros-keyboard-map.py
+# Handle any special cases
+if (grep -E "^(Nocturne|Atlas|Eve)$" /sys/class/dmi/id/product_name &> /dev/null)
+then
+	cp configs/cros-pixel.conf cros.conf
+else
+	python3 cros-keyboard-map.py
+fi
 
 echo "Installing config"
 $privesc mkdir -p /etc/keyd