sudo dmesg -w|grep "Manufacturer: Keychron K1"| xargs -I{} xset r rate 250 70
It does not work, why?
I am trying to reset keyboard settings when the keyboard is reconnected, but I cannot get dmesg -w|xargs...
combination to work. It supposed to be working, for example if I do this:
while :; do echo tick; sleep 1s; done|xargs -I{} date
I will get a new time printed every second. The idea was to use dmesg -w
then grep
then xargs
but it does not work until xargs
is killed from another terminal.
Why and how to fix?