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

Re: keyboard autodetection



Simon Richter <sjr@debian.org> writes:

> Hi,
>
>> > > * Is there a way to autodetect (based on hardware IDs) the keyboard type
>> > > (eg., when you install Debian, you have to select keyboard layout and
>> > > country/ type).
>
>> > Hmm.  What you're asking, I think, is whether the hardware ID implies a
>> > layout.  (It's not really autodetection; it's a lookup.)  I don't know.  
>
> I've thought about this extensively at this year's DebConf, however I've
> been unable to implement a real solution. I had to install Debian on one
> box in Brazil, which of course had a Brazilian keyboard. As there are
> two different variants of "Brazilian" keyboards available, I could not
> decide for myself which one was appropriate.
>
> The idea I have in mind is to generate a "decision tree" from the
> available keymap files (flat tree being optimal) and have the user press
> different keys in turn to see what keycode they give. The greatest

Several people had this idea in the past and it seems to be way easier
and more efficient (less keystrokes) than the current methods of
presenting a list or letting the user input free text. The difficult
part would be building a good decision tree from the various keymaps
and adapting the console and X keyboard config to use it.

A decision tree could be balanced against the distribution of such
keyboards (us is more likely than fr) but maybe that wouldn't affect
the tree anyway.


Advantage: Very easy to configure even if you don't know what keyboard
you have. If you are to dumb to press a few keys you probably
shouldn't be using a computer.

Disadvantage: Harder to select a keyboard variant other than what you
have. Many people want us mappings even with an de keyboard or at
least the programmers variant ({[]} mapped differently) and you might
not know the fine details the decision tree asks off hand.

Overall I would suggest making the "Please press 'y'" configuration
default but have the current selecting method available too. The
keyboard configuration should asks enough questions to be sure
what keyboard to select for console _and_ X and maybe ask a few
redundant questions in case you mistyped (e.g. ask for z and y to
seperate en/us and de).

> hinderance is the fact that I'm not allowed to read data from the
> keyboard when using DebConf, which is why I have no real idea how to
> implement it in a compatible way for d-i, short of adding a new template
> type "single-keycode" (which would probably work on the console, but
> require additional work if it is supposed to work together with bterm,
> which the installer currently uses, or X, which the installer might use
> in the future).
>
>    Simon

Good luck with this. I'm sure it would be welcome by many.

MfG
        Goswin



Reply to: