I use a lovely old IBM model M keyboard, made in 1984 and still going strong. I like it because the keys use "buckling spring" technology, which makes them very clicky and positive. Many people agree that these are the best keyboards ever made. I have five of them, so I don't expect to ever use an inferior keyboard. I also have an original IBM PC keyboard, plus an adapter so that I can use it on modern computers.
But there's always a shadow in heaven. Occasionally, one of the keys seems to stick, and I get a letter repeating indefinitely. This isn't the fault of the keyboard, I think, because the key isn't actually sticking. But my computer thinks it is. And I finally decided to do something about it.
To set keyboard delay, the linux command is
kbdrate -d 1000
That didn't seem to do anything. So I had a think, and I decided that it was X windows that needed fixing, and I did
xset r rate 1000 30
which tell is to wait 1000 milliseconds with a key held down before repeating, and then repeat at 30 characters per second.
And I think that's fixed it!