These are definitions, giving which key is related to which scancode in
raw keyboard mode. Basically, the code of 'x' on a US keyboard may be that
of a 'Y' on a German keyboard. This way, all types of keyboard can be
represented under DOSEMU. Also, the right ALT-key is often a function
key in it's own right.

The DEAD codes must refer to keys that don't exist on any language
keyboard. I hope nobody has a smily face key :-)
dead_key_table is a list of the dead keys supported. They must
be placed on the correct key in the keymaps above. See key_map_es_latin1.

-----

dos850_dead_map consists of the triple, {deadkey, letter, result}.
It should be correct for all the code page 850 users (Western Europe).
If you uses a different code page, please create a map!
Jon Tombs jon@gtex02.us.es

putrawkey

This function sends a raw keycode byte, e.g. read directly from the hardware,
to DOS. It is both queued for the port60h emulation and processed for the
BIOS keyboard buffer, using the national translation tables etc.

For DOS applications using int16h we will therefore not have to load
KEYB.EXE, others (e.g. games) need their own drivers anyway.

This function is used if we are at the console and config.rawkeyboard=on.

putkey

This does all the work of sending a key event to DOS.
scan - the keycode, one of the KEY_ constants from new-kbd.h
make - TRUE for key press, FALSE for release
ascii - the key's ascii value, or 0 for none.

Applications using int16h will always see the ASCII code passed here
independently of the scancode, so no character translation needs/should
be done. As DOS expects characters in IBM Extended ASCII, the keyboard
clients may have to do ISO->IBM character translation or similar!

An emulated hardware scancode is also sent to port60h.

Note that you have to send both MAKE (press) and BREAK (release) events.
If no BREAK codes are available (e.g. terminal mode), send them
immediately after the MAKE codes.
Also, shift keys should be sent (with ascii = 0).

set_shiftstate

This simply sets the keyboard server's shift state.

USE WITH CAUTION: this changes the keyboard flags without generating the
appropriate shift key make/break codes that normally come along with such
changes. This function is mostly intended for start-up shiftstate synchronisation.

Note also that you can't simply write to the shiftstate variable instead of using
this function.

This module handles interfacing to the DOS side both on int9/port60h level
(if keybint=on), or on the bios buffer level.
Keycodes are buffered in a queue, which, however, has limited depth, so it
shouldn't be used for pasting.