If I remove and then add a new (different) timer from within the thread
of a timer callback, the value I return from the callback is ignored and
the old timer value is still used.
I hope you understand what I mean. More specifically, I am writing a
text-editor/console style control. I have a timer for blinking the
cursor and a timer to repeat a key. When a key is pressed, the key
handler is called once. A timer is set to call the handler again after
500ms (wait for key repeat), and thereafter 50ms (key repeating) until I
get a keyup event (which deactivates the timer). When the key is
repeating I deactivate and reactivate the blink timer to effectively
reset it so that the cursor doesn’t blink when it is moving. If I do
this, the 50ms key repeat value which I return from the key repeat
callback is ignored, so the timer still occurs at the initial value of
Is this a known bug? Is there a way I can reset the blink timer without
removing and then readding it?