Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

unbuffered keyboard input in LISP?

Name: Anonymous 2006-11-23 23:00

Is there a standard way to support unbuffered keyboard input in Common LISP, supported by all Common LISP interpreters?

So far I found something in the 'clisp' interpreter which comes with some nice unbuffered keyboard input macros.  I wrote a readline function:

(defun readline ()
 (ext:with-keyboard
  (let ((rdlinstring ""))
    (loop
     (setq char (read-char ext:*keyboard-input*))
     (setq key (or (ext:char-key char) (character char)))
     (setq rdlinstring (concatenate 'string rdlinstring (string key)))
     (write-string (string key))
     (when (eql key #\Return)
       (return rdlinstring))))))


But this doesn't work in CMUCL or SBCL.  I think anything that exists in an ext: package in one interpreter isn't guaranteed to exist in an ext: package in another interpreter (since ext: isn't Common LISP standard, but implementation-specific extensions).

Ummm, so... is there a STANDARD way to get unbuffered keyboard input in Common LISP that's guaranteed to work properly across all implementations that are standards-compliant?

Name: Anonymous 2006-11-30 3:31

>>2

Uhm... what?

Search for lisp and stty brought up a bunch of Emacs results.  I'm not using Emacs-Lisp, I'm using Common LISP.  Two different dialects for two vey different purposes.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List