Re: onkey trapping

 BBS: Inland Empire Archive
Date: 06-25-92 (20:37)             Number: 1340
From: MARK BUTLER                  Refer#: NONE
  To: BILL CAMPBELL                 Recvd: NO  
Subj: Re: onkey trapping             Conf: (2) Quik_Bas
 On 06-24-92 BILL CAMPBELL wrote to ALL...

 BC> Does anyone out there know how to turn off the numlock key from
 BC> within code? Right now I am just shelling a command to run a 46
 BC> byte .COM program that kills the numlock but I'd prefer to
 BC> access this from within.

 Check these out....

 --------------------------8< CUT HERE  8<----------------------------
 '** keylocks control subs

 SUB AllLocksOFF
    DEF SEG = 0
    POKE &H417, PEEK(&H417) AND &H0
    DEF SEG
 END SUB

 SUB AllLocksON
    DEF SEG = 0
    POKE &H417, PEEK(&H417) OR &H70
    DEF SEG
 END SUB

 SUB CapsOFF
    DEF SEG = 0
    POKE &H417, PEEK(&H417) AND &HBF
    DEF SEG
 END SUB

 SUB CapsON
    DEF SEG = 0
    POKE &H417, PEEK(&H417) OR &H40
    DEF SEG
 END SUB

 SUB NumLockOFF
   DEF SEG = 0
   POKE &H417, PEEK(&H417) AND &H5F
   DEF SEG
 END SUB

 SUB NumLockON
    DEF SEG = 0
    POKE &H417, PEEK(&H417) OR &H20
    DEF SEG
 END SUB

 SUB ScrollOFF
   DEF SEG = 0
   POKE &H417, PEEK(&H417) AND &H60
   DEF SEG
 END SUB

 SUB ScrollON
    DEF SEG = 0
    POKE &H417, PEEK(&H417) OR &H10
    DEF SEG
 END SUB
 --------------------------8< CUT HERE  8<----------------------------

 These help you out?


 -------------> MHB :-)

... OFFLINE 1.39 * I wish I was a whole lot more like I am
.........................................................


--- WM v2.03/91-0012
 * Origin: Com-Dat BBS  Hillsboro, OR.  HST (503) 681-0543 (1:105/314)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET