]> git.wh0rd.org Git - home.git/blob - .kde/Autostart/xset-rate
gdbinit: split up & migrate some to python
[home.git] / .kde / Autostart / xset-rate
1 #!/bin/bash
2
3 unset xmodmap_pke
4 keyname_to_keycode() {
5         : ${xmodmap_pke:=$(xmodmap -pke)}
6         echo "${xmodmap_pke}" | awk -vkey="$1" '$4 == key { print $2 }'
7 }
8
9 # disable repeat on some keys (randomly, they get turned on?!)
10 keys=(
11         Control_{L,R}           # Ctrl key
12         Shift_{L,R}                     # Shift key
13         Alt_{L,R}                       # Alt key
14         Super_{L,R}                     # Windows key
15         Mode_switch                     # Capslock
16 )
17 for x in ${keys[@]} ; do
18         for c in $(keyname_to_keycode $x); do
19                 xset -r ${c}
20         done
21 done
22
23 # xset r rate <delay before autorepeat starts> <repeat rate>
24 #                 in milliseconds              keys per sec
25 exec xset r rate 200 40