aboutsummaryrefslogtreecommitdiff
path: root/remap.sh
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2024-01-20 12:31:58 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2024-01-20 12:31:58 -0500
commite2a0cf2a79b43f9f86b74270f3d96fe300687804 (patch)
treea87edf55f81e78f4d0968d6f006562090260e068 /remap.sh
parentec83443853116b07f18fbef8c6de31cf157939a0 (diff)
downloaddotfiles-e2a0cf2a79b43f9f86b74270f3d96fe300687804.tar.gz
dotfiles-e2a0cf2a79b43f9f86b74270f3d96fe300687804.tar.xz
Cleanup unused files and code.
Diffstat (limited to 'remap.sh')
-rw-r--r--remap.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/remap.sh b/remap.sh
new file mode 100644
index 0000000..37ae9a6
--- /dev/null
+++ b/remap.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -ex
+_s="sudo"
+[ "$(id -u)" -eq 0 ] && _s=""
+hwdb_f="$(mktemp)"
+cat > "$hwdb_f" <<EOF
+# /etc/udev.d/hwdb/01-keyboard.hwdb
+# https://wiki.archlinux.org/title/map_scancodes_to_keycodes
+# also 'yum -y install evtest'
+# evdev:name:AT Translated Set 2 keyboard:*
+# systemd-hwdb update && udevadm trigger
+# or perhaps:
+# udevadm hwdb -u
+# This should match all AT keyboards, apparently
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr*
+ KEYBOARD_KEY_3a=leftctrl
+ KEYBOARD_KEY_1d=leftctrl
+ KEYBOARD_KEY_9d=capslock
+EOF
+
+$_s cp "$hwdb_f" /etc/udev/hwdb.d/01-keyboard.hwdb
+$_s systemd-hwdb update
+$_s udevadm trigger