Number: 1369

Date:  6-Jun-84 14':13':30

Submitter: Wallace

Source: Wallace

Subject: \GETKEY opens up a tty window if it doesn''t have one.

Assigned To: 

Attn: 

Status: Incomplete

In/By: 

Problem Type: Design - UI

Impact: Annoying

Difficulty: Moderate

Frequency: Everytime

Priority: Unlikely

System: Language Support

Subsystem: Read and Print

Machine: 1132

Disk: 

Lisp Version:  3-Jun-84 16':29':06

Source Files: 

Microcode Version: 5124

Memory Size: 4096

File Server: 

Server Software Version: 

Disposition: '
["burton.pa" "30-Aug-84 10':19':19" Status':(Open->Incomplete) Problem% Type':(Bug->Design% -% UI) Impact':(Moderate->Annoying) Priority':(Perhaps->Unlikely) Description':]'
["Masinter.pa" "18-Sep-84 17':12':42" Attn':]

Description: I want to get a character from the terminal.  I want to wait for it and read it, without line buffering.  In other words, I want common-lisp TYI.  All I could find was the undocumented \GETKEY.  If there isn''t a tty window \getkey creates one when called.  All I want to do is get the character, not echo it.'
---------'
Date': 30 Aug 84 10':17 PDT'
From': burton.pa'
Subject': AR 1369': \GETKEY creating TTY window'
To': Wallace'
cc': Masinter, Kaplan, burton.pa'
'
I believe that the reason \GETKEY is creating a tty window is to flash the caret.  If you don''t want this, you can turn the caret off with (CARET ''OFF).'
'
\GETKEY is not a user entry and is subject to change.  Below is a version of TYI from user entries.  Ron or Larry may be able to make it more efficient.  '
'
(DEFINEQ'
   (TYI NIL (* * reads a character from the terminal and returns it without echo)'
       (RESETLST (RESETSAVE(CARET (QUOTE OFF))) '
             (RESETSAVE (ECHOMODE NIL))'
             (RESETSAVE (CONTROL T))'
             (BIN T)))'
'
This will only work if the process running TYI has the keyboard.  If it doesn''t, then it will hang forever because there is no window associated with that process to give it the keyboard.  (Do you know what common-lisp TYI does wrt processes?)'
'
Richard'
'


Workaround: 

Test Case: 

Edit-By: Masinter.pa

Edit-Date: 18-Sep-84 17':12':43