Page 1 of 1

raw keyboard input

Posted: Thu Dec 15, 2011 7:53 am
by barthes
I am trying to find out how to do a raw input from a keyboard directly, WITHOUT using a window or window pane. I.e., I'd like the keyboard handler to deliver each character as soon as the key is pressed (without having to type ENTER or CR). I am using ACL 8.2. Any idea? Than you.

Re: raw keyboard input

Posted: Thu Dec 15, 2011 10:50 am
by nuntius
You can try read-char-no-hang, but that will likely block until Enter is pressed.

In addition to the obvious implementation-specific details, this also depends on which OS you are using and exactly where you are typing.

For example, a linux terminal must be in "raw mode" or else it buffers text into lines.

If you can't find any allegro-specific instructions, then Linedit might provide some inspiration.
http://common-lisp.net/project/linedit/

Re: raw keyboard input

Posted: Fri Dec 16, 2011 3:01 am
by barthes
Than you for your answer. However, it does not solve my problem. I am using a virtual Windows 7 machine on top of Parallels Desktop on a Mac OS 10.6.8. I could certainly write a FF, but the raw-input feature exists in some Lisps other than ACL...

Re: raw keyboard input

Posted: Fri Dec 16, 2011 6:05 pm
by nuntius
Sorry; I'm not that well versed in Allegro.
You will probably be able to get better help from the Allegro-cl mailing list.
http://franz.com/support/acl.forum.lhtml