Re: cell-phone like keyboard driver anywhere?

From: Jan Harkes (
Date: Fri Aug 23 2002 - 09:21:40 EST

On Fri, Aug 23, 2002 at 09:54:11AM +0200, Holger Schurig wrote:
> > IMO this should not be done by the kernel, but by the application.
> One can read such stuff all the time ... but really this is not possible in a
> general way. You don't know in advance if one runs a ncurses, text-only,
> Qt/Embedded or X-Windows application.
> > - it is easy for the application to check the timing of the
> > keys pressed and produce the desired characters instead [poll (2)].
> Yes, it's easy to put that in a Qt/Embedded app, but what is when the app
> terminates? You could not restart it via the keyboard, because the keyboard
> is dead. Yeah, it's cumbersome to restart it with a cell-like keyboard, but
> it's possible.

If the app dies, it should drop you in something like a shell that
should probably simply have the same keyboard decoding code. Or maybe
something smarter. It could use the something like my empeg is using
when searching for song titles.

Press 5 (JKL), all songs starting with either j, k, or l will be
selected, and the display shows 'Kind of Magic'. Press 3 (DEF) and it
limits the selection to any songs that have one of those letters in the
second place. Then press 8 (TUV) and we get 'Let It Be'. So with 3
keypresses I just picked a song out of a selection of almost 1000. I
guess Nokia is doing something similar based on a dictionary.

(or drop back into a menu which doesn't even need key translation)

In any case, how the keys are interpreted is very much application
specific, and can be implemented in a userspace library. I really do not
think it is a good idea to put a complete dictionary or other list of
possible completions in kernel space to implement such alternative input

> Anyway, I have to write it low-level, in the kernel. I just wondered if
> something like this already exists.

If you really _have_ to write it low-level in the kernel, it sounds like
a class assignment, in which case you really shouldn't be asking for
existing implementations.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:28 EST