This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

raw keyboard input

4 posts · 2855 views

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

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

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...