http://www.repairfaq.org/filipg/LINK/PORTS/F_Keyboard_FAQ.html

[MCA] kbd command

   F8
          'Set all keys make/break'

   FC
          'Set key type make/break'


 F3h    double  set mouse sample rate in reports per second
                0Ah=10/s           50h= 80/s
                14h=20/s           64h=100/s
                28h=40/s           C8h=200/s
                3Ch=60/s



I don't want to lose anything that can usefully be part of any imaginable
human interface, such as keyboard break codes, or mouse "Z" data. The
absolute minimum a keymouse handler can losslessly do is read bit 5 of IO
0x64 (0x60?), and buffer the byte by mouse or keyboard. And rincrement the
pertinent buffer count I guess. Stuff to read command responses and so on
should transiently install another handler for the purpose.

Keyboards and mousen have brains, and talk over a serial line to a
controller with a brain. You send commands to the near side brain via
0x64, which is also the controller status register on a read. 0x60 is the
computer-side view of the wire to the external brain. You send commands to
the external brain at the other end of the cable over 0x60. Keyboard scan
rate and mouse resolution are on the external devices themselves, for
example.

Bit 1, read, 0x64, the wait bit. A command to the controller that returns
data will assert this bit when the data becomes valid. This is a poll-wait
situation, but it's only for commands.

Bit 5 read 0x64 is "0x60 data is aux". This is how you parse mouse and kbd
data from the one stream on 0x60.
HOWEVER, the mouse can be put on IRQ 12.




MF II keyboard protocol translation to simpler arbitrary keycodes
sent			us	face

			cPC

0xe0 0x1c               96      numpad ENTER down
0xe0 0x1d               97      right ctrl
0xe0 0x2a 0xe0 0x37     98      printscreen down
0xe0 0x35               99      numpad / down
0xe0 0x38               100     right alt
0xe0 0x47               101     home
0xe0 0x48               102     up arrow
0xe0 0x49               103     page up
0xe0 0x4b               104     left arrow
0xe0 0x4d               105     right arrow
0xe0 0x4f               106     end
0xe0 0x50               107     down arrow
0xe0 0x51               108     page down
0xe0 0x52               109     insert
0xe0 0x53               110     delete
0xe0 0x5b               111     left Microsoft deformity
0xe0 0x5c               112     right Microsoft deformity
0xe0 0x5d               113     right Microsoft extra deformity
0xe0 0x9c                       numpad ENTER
0xe0 0x9d                       right ctrl
0xe0 0xb5                       numpad / up
0xe0 0xb7 0xe0 0xaa             printscreen up
0xe0 0xb8                       right alt
0xe0 0xc7                       home
0xe0 0xc8                       up arrow
0xe0 0xc9                       page up
0xe0 0xcb                       left arrow
0xe0 0xcd                       right arrow
0xe0 0xcf                       end
0xe0 0xd0                       down arrow
0xe0 0xd1                       page down
0xe0 0xd2                       insert
0xe0 0xd3                       delete
0xe0 0xdb                       left Microsoft deformity
0xe0 0xdc                       right Microsoft deformity
0xe0 0xdd                       right Microsoft extra deformity
