Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #! /bin/sh -e
  2. # read list of scancodes, convert hex to decimal and
  3. # append to the atkbd force_release sysfs attribute
  4. # $1 sysfs devpath for serioX
  5. # $2 file with scancode list (hex or dec)
  6.  
  7. case "$2" in
  8. /*) scf="$2" ;;
  9. *) scf="/usr/lib/udev/keymaps/force-release/$2" ;;
  10. esac
  11.  
  12. read attr <"/sys/$1/force_release"
  13. while read scancode dummy; do
  14. case "$scancode" in
  15. \#*) ;;
  16. *)
  17. scancode=$(($scancode))
  18. attr="$attr${attr:+,}$scancode"
  19. ;;
  20. esac
  21. done <"$scf"
  22. echo "$attr" >"/sys/$1/force_release"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement