Re: Mouse and keyboard drivers in the Linux Kernel?

Martin Mares (mj@ucw.cz)
Sat, 22 May 1999 15:30:48 +0200


Hello!

> It is normal for the Linux kernel, but not very programmer friendly.
> The abnormality of the Linux OS is that there are absolultely no
> standard OS services for dealing with the mouse and keyboard from a
> console in the manner that we need to.

There _are_ standard Linux OS services dealing with the mouse,
but _not_ in the kernel. They are in libgpm.

> The keyboard services currently in the kernel are archaic, and not useful for
> event driven systems (hence the need to program the keyboard in raw mode).

Agreed. I and Vojtech Pavlik are currently working on a better
code.

> You have just summed up the *exact* problem with the current scenario
> in Linux. All that stuff needs to be handled in user space, so any
> console apps that want to talk to the mouse and keyboard in a modern
> manner need to contain code that knows how to talk to every mouse
> device,

No way, they just link with libgpm.

> and knows how to do code page translations for keyboard data.

> There should be a standard set of OS services (perhaps a beefed up
> userland daemon based on GPM, but I prefer it in the kernel)

Why?

> that *everyone* is expected to talk to. This way all apps can be easily
> extended to add support for new mice and keyboards without having to update
> the code for every project and deal with it that way.

> As for GPM, the biggest problem with it is that it is always an
> optional component in Linux distributions. Hence not all systems have
> it installed, and hence you can't rely on it.

Why? Even the version of libc you use is not in _all_ distributions.
This is exactly why almost every distribution has a system of dependencies
which allows packages to specify what optional packages they need.

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"Linux vs. Windows is a no-WIN situation."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/