OSInitBetweenKeyDelay Function (ROM Call 0x249*)

kbd.h

short OSInitBetweenKeyDelay (short rate);

Sets the rate at which a key autorepeats.

OSInitBetweenKeyDelay sets the rate at which a key autorepeats to rate (note that only few keys have an autorepeat feature, namely arrow keys and backspace). The measuring unit for this function is 1/395 s (because Auto-Int 1 is triggered 395 times per second), and the default value for rate is 48. OSInitBetweenKeyDelay returns the previous autorepeat rate.

Greg Dietsche pointed out that on HW2 (precisely, if the gateArray field of the structure returned by FL_getHardwareParmBlock exists and is 2 or higher), TIOS immediately multiplies the value passed to it by 3/4. This is probably a bug, as this implies that there is no way to restore the rate to the value previously returned by OSInitBetweenKeyDelay. To work around this problem, OSInitBetweenKeyDelay is defined as a macro which detects this modification in a smart way, and tries to revert it for the return value.


Uses: FL_getHardwareParmBlock