I am using the excellent Python-evdev library for a utility that remaps keys in a certain way, similar to at-home-modifier. In the process, I am grabbing all my physical keyboards and pipe the keys to a virtual keyboard.
If possible, I would like to disable auto repeat for all grabbed keyboards, but not globally for the whole X server. What I have so far is a hack, just setting the auto repeat delay to something very large, e.g.
import evdev
dev = evdev.InputDevice('/dev/input/event5') # Insert your keyboard device here
dev.grab()
dev.repeat = evdev.device.KbdInfo(repeat = 300, delay = 600000)
print(dev.repeat)
dev.ungrab()
Funnily enough, this sets the repeat to 500 instead of 300. I tried setting the delay to 0 or -1, but this is just getting ignored. Is there any way at all to completely disable the auto-repeat, maybe using different tools?