Update 2021-01-23: For some reason it works now. The bug is not marked as fixed and the code hasn't changed, so I don't know what the difference is. But the key repeat is fast now.
I found the source of the problem.
Qt5 is likely using libinput
by default on Wayland (I have not confirmed this, but it seems likely). The source for qlibinputkeyboard.cpp
contains hard-coded repeat settings:
const int REPEAT_DELAY = 500;
const int REPEAT_RATE = 100;
// ...
m_repeatTimer.setInterval(REPEAT_DELAY);
m_repeatTimer.start();
Yup, Qt5 with libinput implements its own repeat using its own hard-coded settings.
So, it seems that, to avoid this, it is necessary to either:
- Configure Qt5 to use something other than libinput (not sure how to do this); or
- Fix
qlibinputkeyboard.cpp
.