[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UTF-8 keyboard mode



Everybody likes to complain about the dearth of terminal emulators for
UNIX in general, Linux in particular.  At one end of a terminal emulator is
the keyboard.  In UNIX, as we all know, most applications do not have
access to key events.  The only ones which even have a prayer of getting
this access are the console driver and the X server (it is obviously out
of the question for users coming in via dialup, Telnet, etc).

But desktop Linux is an increasingly popular item, perhaps already the
dominant mode of using Linux.  Thus it is a reasonable expectation to have
a terminal emulator, since the user is indeed most likely at the console or
in an X window.  A terminal emulator needs either raw keyboard events
(make/break codes, up/down events, e.g. for PCTERM), or at the next level
of abstraction, a keycode combined with modifier bits, e.g. "Letter A +
Shift + Ctrl + Alt", or "Gray left arrow", or "Function Key 12", etc, plus
all the complications regarding Num Lock, Alt-Gr, Alt-<keypad-digits>, etc
etc.

How does this fit with UTF-8 keyboard mode?  I would assume that UTF-8
must occur at an even higher level of abstraction.  If we are to allow for
Linux-based terminal emulators, we need to provide an API for the application
to get keypress info at any desired level of abstraction, and to "reget" the
same event at a different level.  For example, the user presses the Euro key.
What does the application see?

Are there still keycodes?  How can the application get at them?  The old
UNIX model which only allows the application to see (e.g.) escape sequences
when (say) a Function key is pressed is not adequate for a terminal emulator,
which really, really must know exactly which key or key combination was
pressed.

(Markus and I had this discussion a while back and it seems there was some
sort of undocumented "half cooked" mode in the Linux keyboard driver and I
never got much further than that, but I do believe a more straightforward kind
of keyboard access is needed if we are not going to be using Windows 9x
systems as terminal emulators next to our Linux systems for the rest of
eternity.)

- Frank
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/