[comp.sys.apollo] Keyboard Lock

dennis@PEANUTS.NOSC.MIL (Dennis Cottel) (09/14/88)

> [How to lock the keyboard...]

I have written a lock program called GONE that is on the ADUS tape.

The specific problem of disabling the ^Q is done with an SMD command.
The following lines are from the program:

      {disable quit character for as long as we're in borrow mode}
      smd_$set_quit_char(chr(0), status);

It turns out there is no way from the keyboard to enter a NUL
character.  It's a kludge, but it does the trick.

Apollo says the SMD library is obsolete, but they have assured me
that it will not go away until there is an alternate way to do this.

Hope this helps...                               --Dennis

	Dennis Cottel  Naval Ocean Systems Center, San Diego, CA  92152
	(619) 553-1645      dennis@nosc.MIL      sdcsvax!noscvax!dennis

dave@jplopto.uucp (Dave Hayes) (09/15/88)

I lock my keyboard by redefining all keys INCLUDING the return key.
The RETURN key (in the simplest version) is hidden at some other key,
my newest version defines a "combination lock" of keys that must be hit 
in the proper sequence to restore the key definitions.

If you give me a mail address, I'll give you more info.

Dave Hayes

dave%jplopto@jpl-mil.jpl.nasa.gov

FERGUSON@BKNLVMS.BITNET (09/20/88)

To prevent users from entering a quit fault, you should use the
pfm_$inhibit system call. The purpose of this call is to
ignore control 'q'. You must remember that some key-defining maniac
could make F1 the quit character or something, and disabling cntrl 'q'
alone might not be perfectly robust.

Scott Ferguson

dennis@gandalf.nosc.mil (Dennis Cottel) (09/21/88)

Scott Ferguson writes:
> To prevent users from entering a quit fault, you should use the
> pfm_$inhibit system call. The purpose of this call is to
> ignore control 'q'.

This call will let you catch a ^Q all right, but the second ^Q
interrupts the program and can't be caught.  That is why Apollo
recommended to me (at least in March of 1986) the trick of using
the smd_$quit_char call to change the quit character.

   Dennis Cottel  Naval Ocean Systems Center, San Diego, CA  92152
   (619) 553-1645     dennis@NOSC.MIL       sdcsvax!noscvax!dennis