[comp.windows.ms] Keyboard repeat delay

gt1174a@prism.gatech.EDU (Horkan Smith) (10/25/90)

For all of you keyboard speed freaks out there, I've finally gotten around
to patching the keyboard driver.

On AT & 101/2 type keyboards, the auto-repeat rate and *delay before
repeating* are both fairly easy to change.  You just need to send the
keyboard controller a 0xf3, followed by the new rate.  Windows allows
you to set the repeat rate in the control panel, but defaults the delay
before repeat to 1/2 sec.  (same as the power-up default).

Having grown accustomed to maniacal repeat rates, this was annoying.

So, I figured out how to patch the keyboard driver.

If you're not interested, press 'n' now.


First, quit windows.  Windows won't let you fool w/ a driver file while
it's running.  Now

MAKE A BACKUP COPY OF YOUR KEYBOARD DRIVER !!!  PLEASE !!!!

C:\WINDOWS\SYSTEM> debug keyboard.drv
-s 100 l 2000  80 F3 FA

debug should come back w/ a list of places (hopefully only one) where
it found that string.  In mine, it was only at 078D.

-u 78d      ; or whatever your search turned up

23FA:078D B0F3          MOV     AL,F3
23FA:078F FA            CLI
23FA:0790 E82300        CALL    07B6
23FA:0793 E30E          JCXZ    07A3
23FA:0795 8D1E0000      LEA     BX,[0000]
23FA:0799 03DA          ADD     BX,DX
23FA:079B 2E            CS:
23FA:079C 8A07          MOV     AL,[BX]
23FA:079E 0C20          OR      AL,20       <<--- this is the culprit!
23FA:07A0 E81300        CALL    07B6
23FA:07A3 FB            STI
23FA:07A4 E304          JCXZ    07AA

Notice the OR  AL,20 at 079E?  Just NOP that instruction out, and you've
got it.  For those who have no idea what a NOP is, try the following:

-e 079e 90 90   ; using the address for your OR statement if it's different.

Okay, that's it, let's save it.

-w
-q

Now then, start up windows and give it a try!
Note:  This just changes the delay - the repeat rate still gets controlled
by the Control Panel.

From what I can tell of the code, this same stuff should be in almost all
of the keyboard drivers, but there's no telling where.  It's been tested
only on a AMI Bios 386 w/ an 84 key (old AT style) keyboard.

Good luck!
-- 
G. Horkan Smith
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp: ...!{allegra,amd,hplabs,seismo,ut-ngp}!gatech!prism!gt1174a
ARPA: gt1174a@prism.gatech.edu