diff options
| -rw-r--r-- | readme.md | 2 | ||||
| -rw-r--r-- | remap/at-kbd.sh (renamed from remap.sh) | 0 | ||||
| -rw-r--r-- | remap/mbair.sh (renamed from remap-macbookair.sh) | 12 |
3 files changed, 12 insertions, 2 deletions
@@ -6,7 +6,7 @@ ### Key remappings ( Linux specific ) -`./remap.sh` +`./remap/at-kbd.sh` ### Distro specific diff --git a/remap.sh b/remap/at-kbd.sh index 37ae9a6..37ae9a6 100644 --- a/remap.sh +++ b/remap/at-kbd.sh diff --git a/remap-macbookair.sh b/remap/mbair.sh index ac209c0..8ec0e46 100644 --- a/remap-macbookair.sh +++ b/remap/mbair.sh @@ -1,12 +1,22 @@ +#!/bin/sh +set -ex +_s="sudo" +[ "$(id -u)" -eq 0 ] && _s="" +hwdb_f="$(mktemp)" +cat > "$hwdb_f" <<EOF # Example can be hand via evemu-describe and grabbing the DMI line. # This should match most apple keyboards, though. # # From for remapping you'll want to run `evtest` for the input, # the keyboard key code, take the value you get from the type 4 EV_MSC # lines -evdev:*:dmi:bvnAppleInc.:bvr*:bd*:br0.1:svn*:pn*:pvr* +evdev:name:Apple Inc*Internal Keyboard* KEYBOARD_KEY_70039=leftctrl KEYBOARD_KEY_700e3=leftalt KEYBOARD_KEY_700e2=leftmeta KEYBOARD_KEY_700e6=capslock +EOF +$_s cp "$hwdb_f" /etc/udev/hwdb.d/01-mbair.hwdb +$_s systemd-hwdb update +$_s udevadm trigger |
