mKEYB readme.txt (Version 0.40bg)

******* WHAT mKEYB is ********************

mKEYB is a minimum keyboard driver for xxDOS, requiring
only ~500 bytes of memory to support international keyboards
	(russian 452, german 474, spanish 718 byte)

mKEYB is also an interesting demonstration of

	'The Art of writing small TSR's in High Level Language'
	
	

** provided drivers **********************

***************** changed section **********************

***Version 0.40bg

      MKEYB BG  - Bulgarian BDS      MIK keyboard
      MKEYB BGP - Bulgarian Phonetic MIK keyboard
      MKEYB B1  - Bulgarian BDS      W1251 keyboard
      MKEYB B1P - Bulgarian Phonetic W1251 keyboard
      MKEYB B5  - Bulgarian BDS      CP855 keyboard
      MKEYB B5P - Bulgarian Phonetic CP855 keyboard
      MKEYB B6  - Bulgarian BDS      CP866 keyboard
      MKEYB B6P - Bulgarian Phonetic CP866 keyboard

********************************************************
Version  0.40bg based on originall 0.40 version
By Genadi Atanasov, injinera@mail.ru
feat. Anton Zinoviev,  anton@lml.bas.bg

Changes: Only Bulgarian Codepages and layouts
         LeftCtrl - Switch QWERTY - Bulgarian keyboard


29 dec 2004 Genadi Atanasov  (nickname - Injinera)
********************************************************
************** below without changes *******************


******* Implementation notes ******************

    mKEYB is based on the idea, that the keyboard is already
    (mostly) handled by the system BIOS, and that most keys
    are already correctly handled by it.

    this includes:
    function keys, cursor keys, ctrl,alt,del,shift,
    CtrlAltDelete, SysKey, ALT+numberPad, and most characters.

    also, all INT16 functions are already done by the BIOS.

    so mKEYB relies mostly on the BIOS to do what must be done,
    and only exchanges a few keys, as required by the national
    keyboard layout.

	mKEYBxx loads itself as high as possible; there is no need
	to LOADHIGH mKEYBXX



******* changing an existing language ******************

    to change an existing language, you need Borland's
    Turbo C++ 1.01; newer versions should work as well.

    please modify BUILD.BAT to your compiler directory.


    all keyboard definitions are located in a "keydefXX.h"
    file, where XX is the language you want to modify.

    change the definition file (see below), then run BUILD.BAT

    this should generate a new

        mkeybXX.exe

    testing the new keyboard handler is easy:

    start mkeybXX with any argument, and mkeyb will go into
    a debug mode, where all keys you type are shown; press
    ESCape to end this mode.


******* KEYDEFxx.H table layout:

    All keyboard definitions should be created, using some 
    predefined MACROS. these are
	

    PUNCT(scan,lcase,ucase) 
    	upper and lower case character definition
    ALPHA(scan,lcase,ucase) 
    	like PUNCT, but obeys CAPSLOCK rules
    	
    PUNCT_CTRL(scan,lcase,ucase,ctrl) 
    ALPHA_CTRL(scan,lcase,ucase,ctrl) 
    	like above, but additionally a CtrlCharacter is defined
    	
    ALTGR(scan,code) 
    	this scancode generates addition char if ALTGREY is pressed
    ALTGRSHIFT(scan,code1,code2) 
    	like ALTGR, but shifted key generates different key

    PUNCT_ALTGR(scan,lcase,ucase,altgr)           
    PUNCT_CTRL_ALTGR(scan,lcase,ucase,ctrl,alt) 

    REPLACE(scan,code)
    	replaces one scancode by another one (german keyboards
    	have 'Y' and 'Z' swapped)


COMBI tables:
    these are not needed by all languages, but some (like spanish catalan)
    require them. they mostly define '`^ + aeiou

    COMBI define characters, that are generated by two sequential
    keystrokes, like '+A, `+A, ~+A, for some swedish characters.

    if needed, COMBI must be defined in the keydefXX.h file.

    COMBI keys work like - for example for ^+A

main table:
    scancode for '^', NORMAL, COMBI11, 'x', 'y'

combi1table[] =
    {
    scancode for 'A', lower case a+^, upper case A+^
    scancode for 'E', lower case e+^, upper case E+^
    ...
    scancode for ' ', character '^' itself,character '^' itself
    }
    the last line is also used as default, for the case, that the next
    key is not 'AEIOUN', so ^+X will generate both '^' and X

******* adding a new language ******************

adding a new language (say japanese = JP)

decide, if you need COMBI characters or not

open MAKEFILE, search LANG_GR
duplicate this section, and replace all GR with JP

open KEYBD.C, search LANG_GR again, and duplicate again.


search an existing KEYDEFXX.H, that more or less closely
resembles your layout (say keydefGR.H),
and copy it to keydefJP.h

if there already exists (in xkeyb) a key definition, run

	C:\mkeyb> FC GR.key JP.key

add these changes to keydefJP.h



run BUILD.BAT, and you should have a mKEYBJP.EXE now,
ready to be tested (see above)

*************************************************

have fun with it

5 jun 2002

tom ehlert


