IN/OUT Linux followup question.


Results 1 to 4 of 4

Thread: IN/OUT Linux followup question.

  1. #1
    Join Date
    Dec 2002
    Location
    Ottawa, Ontario, Canada
    Posts
    86

    IN/OUT Linux followup question.

    Hi;

    I am trying to trace the in/out process in Linux. I have most of what is happening summarized in the this little formula: Keycap => key matrix bytes => scan code => key code => keysym.

    At this point I have one simple little question. Either an explanation or directions to an appropiate historical site would be welcome. My question is this:

    Are scan codes established by each keyboard manufacturer or is there a standard established somewhere? I know from my reading, there are three modes of scan codes and I know they apply at least to the 4082 controller and it appears they aren't random so: Is there a history; or, a protocol; or a pragmatic reason why they are so similar?

    I just want to round off my understanding.

    Regards
    Regards Bill
    Fedora 14, Gnome 2.32.2.1
    Evo.2.32, Emacs 23.2.1

  2. #2
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Hmm... There would almost have to be a standard somewhere, although I have no idea where it would be. Perhaps it was part of the original IBM PC specification? (I'm also not sure where you might be able to find that spec anymore.)

    As for what the scan codes actually are, I was able to find this on Google:

    http://www.glue.umd.edu/~nsw/ench250/scancode.htm

    I'm not sure how accurate it is, but it seems to have most scancodes (at least, most of them that are available on a 101-key keyboard).

    Special "media keys" or whatever are most likely manufacturer-specific scan codes, if they're done with scan codes at all. (I believe that's why the Windows keyboard driver interface allows keyboard drivers to insert special scancode->key code mappings. It would also be why the Linux programs to use most of these media keys need to specifically support your keyboard before they'll work.)

  3. #3
    Join Date
    Dec 2002
    Location
    Ottawa, Ontario, Canada
    Posts
    86
    Thanks bwkaz;

    I have several sites that show the scan codes and how they are used. But my curiosity was peaked when I could find no reference to a standard or their origination. The answer isn't essential, but I always find understanding is a little more complete when mixed with a smidgen of authority and a dollop of history.

    Regards Bill
    Regards Bill
    Fedora 14, Gnome 2.32.2.1
    Evo.2.32, Emacs 23.2.1

  4. #4
    Join Date
    Dec 2002
    Location
    Ottawa, Ontario, Canada
    Posts
    86
    Hi bwkaz;

    Found a site called 'Scan Codes Demystified' at http://www.quadibloc.com/comp/scan.htm.

    Tells you more than you would ever want to know about the history of scan codes. It appears that you were right. Scan codes were created by IBM for the AT keyboard, when the AT ruled the world. All the clones that came after used the same scan codes on their keyboards for obvious competative reasons. As the number of keys grew, different manufacturers added new scan codes of their own devising it seems, but kept the basic 84 originated by IBM. There does not seem to be any governing body or rules for these codes, just time honoured industrial theft (borrowing).

    I found several sites by googling for 'scancodes + IBM', thanks to your earlier remarks.

    Regards
    Regards Bill
    Fedora 14, Gnome 2.32.2.1
    Evo.2.32, Emacs 23.2.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •