diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2022-12-16 19:42:42 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2022-12-16 19:42:42 -0500 |
| commit | a63d69d91259230acf4fdd481329baae1064eae6 (patch) | |
| tree | fc426eaf3d2b902aca14f150045b97b218a011a8 /linux-ncaps.sh | |
| parent | f8d2f80eb0a7faf875f5527125a81e5c635c8150 (diff) | |
| download | dotfiles-a63d69d91259230acf4fdd481329baae1064eae6.tar.gz dotfiles-a63d69d91259230acf4fdd481329baae1064eae6.tar.xz | |
Rename file and resulting conf file to hwdb.
Diffstat (limited to 'linux-ncaps.sh')
| -rw-r--r-- | linux-ncaps.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linux-ncaps.sh b/linux-ncaps.sh new file mode 100644 index 0000000..f48d9cb --- /dev/null +++ b/linux-ncaps.sh @@ -0,0 +1,23 @@ +#!/bin/sh +set -e +set -x +_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' +# This is a fucking lifesaver +# evdev:name:AT Translated Set 2 keyboard:* +# systemd-hwdb update && udevadm trigger +# 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 |
