Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!nrl-cmf!cmcl2!adm!CROWTHER@cambridg.csc.ibm.com From: CROWTHER@cambridg.csc.ibm.com (Nancy Crowther) Newsgroups: comp.lang.pascal Subject: Changing NumLock key status with TP3.0 Message-ID: <16718@adm.ARPA> Date: 2 Aug 88 21:53:27 GMT Sender: news@adm.ARPA Lines: 35 I have used the following code to press and release Num Lock from within a program (under Turbo 3): (*********************************************************************** * Routine: PressNumLock * Purpose: Sets Num Lock key. **********************************************************************) procedure PressNumLock; const NUMLOCK = $20; var Keystatus: byte absolute $0040:$0017; (* keyboard status byte 1 *) begin Keystatus := Keystatus OR NUMLOCK; end; (*********************************************************************** * Routine: ReleaseNumLock * Purpose: Releases Num Lock key. **********************************************************************) procedure ReleaseNumLock; const NUMLOCKOFF = $DF; var Keystatus: byte absolute $0040:$0017; (* keyboard status byte 1 *) begin Keystatus := Keystatus AND NUMLOCKOFF; end; Nancy Crowther