Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!aramis.rutgers.edu!paul.rutgers.edu!njin!njitgw!mars.njit.edu!cd5340 From: cd5340@mars.njit.edu (Charlap) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: NUMLOCK key and Extended Keyboard Scancodes .. HELP! Message-ID: <2195@njitgw.njit.edu> Date: 31 Jan 91 19:10:04 GMT References: Sender: news@njitgw.njit.edu Distribution: comp.sys.ibm.pc.hardware Organization: New Jersey Institute of Technology Lines: 22 You have a minor misconception of keyboards. With a PC/XT type keyboard, each key returns the computer a code when a key is pressed, and one when it is released (make codes and break codes). The lock keys are just keys like any other ones, each with its own make/break codes. The lights are toggled by the keyboard circuitry and have no bearing on the actual lock status. The codes are interpreted by software (usually in your BIOS) via the INT 9 (keyboard) interrupt. The INT 9 handler converts the make/break codes into events, and either toggles shift/lock status bits in memory, or pushes keys into the buffer, or reboots the computer, or anything else that is required by the keyboard handler. So, when you press , the light is toggled, and a bit is set in memory. If you unplug the keyboard and re-plug it (a very bad habit to get into), then the keyboard resets, and the lights are cleared. The computer doesn't know this, though, so the light now reads the opposite of what it should. An AT keyboard has a 2-way communication channel with the AT. This means two things: Unplugging the keyboard from an AT will crash the system (often). And the lights always read the true state of the lock keys, so if software changes the lock status, the lights change. --- David Charlap (cd5340@mars.njit.edu)