Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
SetSpeed
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
int SetSpeed(Rate)
int Rate;
 
The SetSpeed function sets the repeat rate of the keyboard. This function is
intended to be used by Control Panel and by the initialization of Windows.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
 
Rate       Specifies the repeat rate. The lowest 5 bits define the desired
           repeat rate. If Rate is -1, the return value is a value
           indicating speed-setting capability.
 
Return Value
 
The return value is the repeat rate, or a value specifying whether the
repeat rate can be set.
 
If Rate is a repeat rate (not -1), the return value is the repeat rate
actually set on the keyboard if it is successful. If it could not set a new
rate, the return value is -1.
 
If Rate is -1, the return value is 0 if the repeat rate speed can be set.
Otherwise, it is -1.
 
Comments
 
The export ordinal for this function is 7.
 
This function is used in conjunction with Control Panel for setting the
keyboard repeat rate.
 
If the keyboard speed cannot be set from software, this function may be
reduced to a stub which always returns -1. In that case, Control Panel will
not display a menu selection for setting keyboard speed.
 
                                      ♦