blob: b82674840f7db6c6b62d7fb7d13a57c1f4ce8d3c [file] [log] [blame] [raw]
#!/bin/sh -e
# read list of scancodes, convert hex to decimal and
# append to the atkbd force_release sysfs attribute
# $1 sysfs devpath for serioX
# $2 file with scancode list (hex or dec)
case "$2" in
/*) scf="$2" ;;
*) scf="@udevlibexecdir@/keymaps/force-release/$2" ;;
esac
read attr <"/sys/$1/force_release"
while read scancode dummy; do
case "$scancode" in
\#*) ;;
*)
scancode=$(($scancode))
attr="$attr${attr:+,}$scancode"
;;
esac
done <"$scf"
echo "$attr" >"/sys/$1/force_release"