[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: low level kbd reading.
Subject: low level kbd reading.
Date: Sat, 15 Oct 88 19:12 EDT
From: Peter Clitherow <pc%ctt.bellcore.com@LABS-N.BBN.COM>
I'm writing a screen locker (there is subtle pressure here to make
LISPMs more secure. this is a start) which works by process-disabling
Keyboard and Mouse, so the user can't do anything nasty...
The following is a little simple-minded, but it sounds like it should work
without munging processes but still allowing you arbitrary input:
1] Throw up a window to cover the screen.
2] Mask out Select and Function keys by setting tv:*SELECT-KEYS* and
tv:*FUNCTION-KEYS* to nil. (A touch heavy-handed, but doing it
with a LET-GLOBALLY or an UNWIND-PROTECT should make it safe enough.)
3] Get rid of unwanted mouse-clicks by redefining the methods
:MOUSE-BUTTONS and :MOUSE-CLICK for the covering window's flavor. They
should do nothing but return T (the methods are OR'ed together, so
returning T says this method was the method who wanted to handle the click;
it just didn't do anything).
4] Mask out C-M-ABORT, etc., by rebinding si:ASYNCHRONOUS-CHARACTERS on the
covering window to NIL (this would be a good place to leave yourself a
backdoor, by defining some secret key combination).
Now the window's process (or whoever is collecting its input) should be
able to sit there and accept any input (e.g. via READLINE) which you can
dispatch on at your leisure.
The only thing you should have to worry about is someone booting (warm or
cold), but you'd have to worry about this in any case -- presumably by
munging the *-boot-initializations.
(Sorry it took so long to answer; Thanksgiving and all that.)