Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C keyboard libraries

Name: Anonymous 2012-02-19 16:52

Hey all you *nix programmers, do any of you know if there's a way to make an ncurses game with more advanced keyboard interaction?  I'm looking for a way to detect if a given key is down during a given frame, rather than if a key is both pressed and released in a frame. Also, I'll need to be able to register more than one key at a time. Is there a way? And if there is, will it work without X11?

Name: Anonymous 2012-02-19 17:44

Why not look at the source of existing games like Nethack and copy their approach?

Name: Anonymous 2012-02-19 18:11

>>2
All games like that which I've seen don't have support for holding down keys over multiple frames or pressing more than one key at the same time.

Name: VIPPER 2012-02-19 18:29

>>1
Disable canonical mode.
See [/m]man termios[/m].

Name: Anonymous 2012-02-20 8:34

Learn D

Don't change these.
Name: Email:
Entire Thread Thread List