Linux input model

Does this look right? I’m trying to explain this to somebody and came up with a diagram.

Feedback appreciated. Thanks.

7 Responses to “Linux input model”

  1. MDK says:

    What a mess.

  2. eald says:

    Any of this explains why Dvorak is broken in Gnome?

    Regards

  3. [...] Go to the author’s original blog: Linux input model [...]

  4. Andreas says:

    eald, just use xmodmap, saves you a lot of trouble.

  5. Dan says:

    I think it is a great learning tool, and that we need a simple image such as this one for each user-visible model.

    It may be quicker to understand it if it were spread out a bit, and aligned into stacks to make the flow clearer.

  6. luc says:

    Great diagram!

    I looked at key events (and their way from the drawing on the key cap, until the character on the screen) a few years ago, and ended up with a similar diagram on my notebook. Here are just a few details out of my notes (which may be outdated, and possibly wrong anyway!):
    The key event (press/release) generates up to 6 scancodes.
    The kernel keyboard driver has two (exclusive?) modes: scancode mode and keycode mode.
    Scancodes are translated (keymap) into either a character “a”, a string “\e[4″, an action.
    Finally if you live out of ascii, you add locales, encodings, and fonts, and you get the complete mess.