[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

low level kbd reading.



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.

In sys:window;basstr.lisp there are some functions to do primitive key
reading, the most interesting one of which is KBD-GET-SOFTWARE-CHAR
which does a basic (read-char) on the keyboard.  Fine, the only problem
with that, is that it's supposed to be used from the Keyboard process,
which takes care to lock interrupts and things.  If pesky users call it,
there are timing problems.  Obviously (i think?)  i can't wrap this with
WITHOUT-INTERRUPTS.

I think KBD-IO-BUFFER-GET ought to do something close to my needs,
except that i can't discover how to make it return....

ideas anyone?

thanks!
pc