Last active
May 2, 2024 17:48
-
-
Save rickybrent/a4c7c725e7f96b06f8ff6fe20b47fdb6 to your computer and use it in GitHub Desktop.
tex shura + laptop right-shift + esc to tilde, caps to ctrl for evsieve
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://github.com/KarsMulder/evsieve | |
if [[ ! -z "$1" ]]; then | |
if [[ "${1:0:4}" == "pci-" || "${1:0:9}" == "platform-" ]]; then | |
input="/dev/input/by-path/$1" | |
else | |
input="/dev/input/by-id/$1" | |
fi | |
elif [[ -e "/dev/input/by-id/usb-04d9_USB-HID_Keyboard_000000000407-event-kbd" ]]; then | |
input="/dev/input/by-id/usb-04d9_USB-HID_Keyboard_000000000407-event-kbd" | |
elif [[ -e "/dev/input/by-path/platform-i8042-serio-0-event-kbd" ]]; then | |
input="/dev/input/by-path/platform-i8042-serio-0-event-kbd" | |
else | |
# Fallback for persist=full. | |
input="/dev/input/by-path/platform-i8042-serio-0-event-kbd" | |
echo "not found" | |
exit | |
fi | |
sudo /usr/local/bin/evsieve \ | |
--input "$input" grab persist=full \ | |
\ | |
--hook key:rightshift key:esc send-key=key:grave \ | |
--toggle key:esc @esc2tilde-up @esc2tilde-down id=esc2tilde \ | |
--hook key:rightshift:1 toggle=esc2tilde:2 \ | |
--hook key:rightshift:0 toggle=esc2tilde:1 \ | |
--block key:esc@esc2tilde-down \ | |
\ | |
--map yield key:capslock key:leftctrl \ | |
\ | |
--output create-link="$input"-evsieve |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment