Re: Keyboard problem

Search this archive.

From: Bart Oldeman (Bart.Oldeman@bristol.ac.uk)
Date: Sun 02 Apr 2000 - 17:11:18 IST


On Sun, 2 Apr 2000, [ISO-8859-2] Pásztor Szilárd wrote:

> Actually I thought svgalib would be good for keyboard handling since it has
> the necessary routines and it seemed pretty low-level for me. I know little
> about how I could read the keyboard. Should I do it the same way as svgalib
> does? Or does the console-keyboard howto have all the necessary info for
> this?

The howto contains some background info. A good thing to refer to in your
case is for instance the source of lxdoom (see lxdoom.linuxgames.com) or
quake-x11 from the QuakeForge project. They need the same kind of keyboard
input as your program and do without svgalib for this. They aren't setuid
root either.

The midnight commander (mc) also uses an X function to get the state of
the shift/ctrl/.. keys. On the console it uses a linux ioctl function for
this. It isn't setuid root either.

In short, only use svgalib if your program needs to do console graphics.

Bart


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST