[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
low level kbd reading.
Date: Sat, 15 Oct 88 19:12 EDT
From: Peter Clitherow <pc%ctt.bellcore.com@LABS-N.BBN.COM>
Does anyone have any insight into this problem?
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.
I run something to occupy the screen, and wait for the user to type a
Return for instance, when it will prompt for a password. So far so
good, we can use (tv:key-state #\Return) for that. Now i have to do the
equivalent of a (read-line) without enabling Keyboard to nasty things
such as c-m-abort etc.
I just thought of one way to do what you want. I have not tried it,
so don't quote me on it unless it works :-). Hope it's helpful.
Keep the Keyboard and Mouse disabled. Then poll the keyboard with
(TV:KEY-STATE ...) looking for the first character in the password to
be depressed. When it appears, start polling for the second
character, and so on through the password. As long as you don't give
the user any chance at the keyboard, there is no way he can tell what
your little password state-machine is doing. Also, an idle machine
stands very little chance of missing the user's keystrokes.
Let me know if this works (or whatever you found that did the job).