From: <wo...@bi...> - 2004-07-13 21:22:03
|
Sam Steingold writes: >> * <jbyswo@ovtsbbg.pbz> [2004-07-12 16:32:31 -0500]: >> >> (ext:with-keyboard . >> (cond ((string= "q" (read ext:*keyboard-input*)) >> (return)) >> ((string= "Q" (read ext:*keyboard-input*)) >> (return))))) > > try > > (ext:with-keyboard > (cond ((string= "q" (read ext:*keyboard-input*)) > (return)) > ((string= "Q" (read ext:*keyboard-input*)) > (return)))) > > > > -- > Sam Steingold (http://www.podval.org/~sds) running w2k > <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> > <http://www.mideasttruth.com/> <http://www.honestreporting.com> > Profanity is the one language all programmers know best. > > I have changed the code to this: (ext:with-keyboard (cond ((char= #\q (read-char ext:*keyboard-input*)) (return)) ((char= #\Q (read-char ext:*keyboard-input*)) (return)))) Which doesn't really work either since (read-char ext:*keyboard-input*) returns this: #S(SYSTEM::INPUT-CHARACTER :CHAR #\q :BITS 0 :FONT 0 :KEY NIL) which I don't know how to parse correctly. It looks like I should be able to query the response to get the :CHAR out, but I can't find anything in the documentation that tells me how to do that. There are methods to get the bits and the font, but not the char or the key as far as I can tell. Perhaps I'm not reading the part of the documentation? Can anyone direct me/teach me the right right thing to do here? Thanks for all the help! It is much appreciated. :) Jeff |