I cannot seem to set the keyboard repeat rate permanently no matter what. I don't like the default setting as it is way too slow. After setting the keyboard Character Repeat delay and interval via "Preferences" -> "Mouse and Keyboard Settings" for faster keyboard repeat rate, it would work ok for a little while, but it reverts back to its original setting after sleep/awake or after reboot or even randomly out of the blue. I'm on Raspbian Stretch 9.9.
~/.config/autostart/LXinput-setup.desktop, I also see:
[Desktop Entry] Type=Application Name=LXInput autostart Comment=Setup keyboard and mouse using settings done in LXInput NoDisplay=true Exec=sh -c 'xset m 20/10 10 r rate 301 10 b off; xinput --set-prop "pointer:dou DZ60" "libinput Accel Speed" 0.660000; xinput --set-prop "pointer:Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)" "libinput Accel Speed" 0.660000' NotShowIn=GNOME;KDE;XFCE;
But the keyboard setting (indicated by the line
Exec=sh -c 'xset...')seems to be not effective, unless I go to "Mouse and Keyboard Settings", and fiddle with the sliders few times. And just like before, the keyboard repeat returns to its original setting after awhile, even though this file didn't change at all.
I've also tried the following.
On the terminal,
xset is the only thing that works, but it's only a temporary solution as it reverts back to original setting when RPi reboots, so I have to re-type this after every single reboot, which is not ideal:
$ xset r rate 300 80
I tried adding the following line in /etc/rc.local, just before
exit 0, but had no effect:
#!/bin/sh -e ... xset r rate 300 80 exit 0
I've added these line to
~/.config/lxsession/LXDE-pi/desktop.conf, and even
/etc/xdg/lxsession/LXDE-pi/desktop.conf but it didn't work:
[Keyboard] Delay=300 Interval=30 Beep=1 # then Reboot or run `lxsession -r`
I've tried this (as I heard it was effective on some Ubuntu --I know I'm on Raspbian/debian but tried anyway), but no luck:
gsettings set org.gnome.desktop.peripherals.keyboard delay 150 gsettings set org.gnome.desktop.peripherals.keyboard repeat-interval 11
I also see
/etc/lightdm/lightdm.conf as a possible place for keyboard setting, but I have no idea.
EDIT: I've just installed stock Raspbian Buster, and it still fails to set the keyboard repeat rate after reboot.