lkml.org 
[lkml]   [1998]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mediumraw keyboard mode?
    From: Frank da Cruz <fdc@watsun.cc.columbia.edu>

What is needed is an API to read keycodes, similar to read(), but which
returns a unique code for each key and key combination, and does so both
for the console and xterms, and yet returns a sensible error when attempted
from a remote terminal.

I heard a rumor that such a "mediumraw" API exists but is not documented.

There is some documentation:

MEDIUMRAW is mentioned in kbd_mode(1) and console_ioctl[s](4).

The Keyboard FAQ has a little information.
It is found in kbd-0.95.tar.gz and many places on the web.
For example, a (slightly outdated) version is found at
http://www.win.tue.nl/math/dw/pp/aeb/linux/kbd/index.html .

Long ago I wrote some text for the Linux Journal; the source
for this paper still exists as
http://www.win.tue.nl/math/dw/pp/aeb/linux/kbd/Linux_keyboard_driver .
This has some more detailed info.


You are not the first to want this - people have written a kbd
library to do just this kind of thing. Someone will be able to
give you a URL.


On the other hand, MEDIUMRAW is a rather primitive interface,
and the details of this interface may well change over time.
(This interface allows for at most 127 different keys,
and this is perhaps not enough in all cases.)

Have you considered using ncurses instead?

Andries

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

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.721 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site