Re: CAPS LOCK

 BBS: Inland Empire Archive
Date: 03-15-92 (16:30)             Number: 105
From: BOB PERKINS                  Refer#: NONE
  To: MATT GLOVER                   Recvd: NO  
Subj: Re: CAPS LOCK                  Conf: (2) Quik_Bas
 MG> ie. I would like to be able to 1. Turn on Caps lock

     DEG SEG = &H40 : POKE &H17, PEEK(&H17) OR 64    'TO TURN ON

 MG>                                2. Turn Off Caps lock

     DEG SEG = &H40 : POKE &H17, PEEK(&H17) AND 171  'TO TURN OFF

 MG>                                3. Lock Caps LOCK in either postion.

                                       ??????????????????????

 MG>                                4. Get status of Caps Lock??

  Maybe this little piece of code will help you out:

 ==========================================================================

 DEF SEG = &H40: CLS
 DO
  a$ = INKEY$
  LOCATE 3, 10: PRINT "INSert on/off          = "; (PEEK(&H17) AND 128) \ 128
  LOCATE 4, 10: PRINT "Caps Lock on/off       = "; (PEEK(&H17) AND 64) \ 64
  LOCATE 5, 10: PRINT "Num Lock on/off        = "; (PEEK(&H17) AND 32) \ 32
  LOCATE 6, 10: PRINT "Scroll Lock on/off     = "; (PEEK(&H17) AND 16) \ 16
  LOCATE 7, 10:  PRINT "ALT Key Down           = "; (PEEK(&H17) AND 8) \ 8
  LOCATE 8, 10:  PRINT "CTRL Key Down          = "; (PEEK(&H17) AND 4) \ 4
  LOCATE 9, 10:  PRINT "Left Shift Key Down    = "; (PEEK(&H17) AND 2) \ 2
  LOCATE 10, 10: PRINT "Right Shift Key Down   = "; (PEEK(&H17) AND 1)
  LOCATE 11, 10: PRINT "INSert Key Down        = "; (PEEK(&H18) AND 128) \ 128
  LOCATE 12, 10: PRINT "Caps Lock Key Down     = "; (PEEK(&H18) AND 64) \ 64
  LOCATE 13, 10: PRINT "Num Lock Key Down      = "; (PEEK(&H18) AND 32) \ 32
  LOCATE 14, 10: PRINT "Scroll Lock Key Down   = "; (PEEK(&H18) AND 16) \ 16
 LOOP WHILE a$ <> CHR$(27)
 DEF SEG
 END

--- Msg V4.5
 * Origin: Reciprocity Failure  (1:124/4115.236)
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