raw keyboard input

Discussion of Common Lisp
Post Reply
barthes
Posts: 2
Joined: Thu Dec 15, 2011 7:37 am

raw keyboard input

Post by barthes » Thu Dec 15, 2011 7:53 am

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.

nuntius
Posts: 538
Joined: Sat Aug 09, 2008 10:44 am
Location: Newton, MA

Re: raw keyboard input

Post by nuntius » Thu Dec 15, 2011 10:50 am

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/

barthes
Posts: 2
Joined: Thu Dec 15, 2011 7:37 am

Re: raw keyboard input

Post by barthes » Fri Dec 16, 2011 3:01 am

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

nuntius
Posts: 538
Joined: Sat Aug 09, 2008 10:44 am
Location: Newton, MA

Re: raw keyboard input

Post by nuntius » Fri Dec 16, 2011 6:05 pm

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

Post Reply