Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!agate!shelby!msi.umn.edu!cs.umn.edu!!jdege From: jdege@ (Jeff Dege) Newsgroups: comp.lang.rexx Subject: Re: Single character input Message-ID: <1991Jan3.001412.9677@cs.umn.edu> Date: 3 Jan 91 00:14:12 GMT References: <1990Dec30.035944.1472@ddsw1.MCS.COM> Sender: news@cs.umn.edu (News administrator) Reply-To: jdege@donald.cs.umn.edu (Jeff Dege) Organization: University of Minnesota, Minneapolis Lines: 19 Nntp-Posting-Host: donald.cs.umn.edu In article <1990Dec30.035944.1472@ddsw1.MCS.COM> veck@ddsw1.MCS.COM (Steven P. King) writes: >Rexx question for the peanut gallery. ARexx, actually. Is there a way to >get single character input from the keyboard? PULL wants a carriage return. >I'm trying to write a program in which it's pretty vital to have single >keystroke commands. > This isn't an Arexx question, it's an AmigaDOS question. Every console handler performs some degree of massaging of input. The standard console in cooked mode allows for command line editting, etc. Nothing gets sent to the application until it sees a newline. The answer, of course, is to either open a new console in raw mode or to set the current console to raw mode. The first is easy. Just call open with a 'raw:0/0/100/100/' filename. The second is more difficult.You need to send an ACTION_SCREEN_MODE packet to the console handler. I have code to do this in C, I have no idea how to do it in REXX. (There is a package in the PD for AREXX called ALIBHOST that allows you to access any system function, so it can obviously be done, but I've never done it.) --------------------------------