  k_esc     =  1;
  k_1       =  2;
  k_2       =  3;
  k_3       =  4;
  k_4       =  5;
  k_5       =  6;
  k_6       =  7;
  k_7       =  8;
  k_8       =  9;
  k_9       = 10;
  k_0       = 11;
  k_minus   = 12;
  k_equal   = 13;
  k_back    = 14;
  k_tab     = 15;
  k_q       = 16;
  k_w       = 17;
  k_e       = 18;
  k_r       = 19;
  k_t       = 20;
  k_y       = 21;
  k_u       = 22;
  k_i       = 23;
  k_o       = 24;
  k_p       = 25;
  k_lbrack  = 26;
  k_rbrack  = 27;
  k_enter   = 28;
  k_ctrl    = 29;
  k_a       = 30;
  k_s       = 31;
  k_d       = 32;
  k_f       = 33;
  k_g       = 34;
  k_h       = 35;
  k_j       = 36;
  k_k       = 37;
  k_l       = 38;
  k_semi    = 39;
  k_apos    = 40;
  k_accent  = 41;
  k_lshift  = 42;
  k_bslash  = 43;
  k_z       = 44;
  k_x       = 45;
  k_c       = 46;
  k_v       = 47;
  k_b       = 48;
  k_n       = 49;
  k_m       = 50;
  k_comma   = 51;
  k_period  = 52;
  k_slash   = 53;
  k_rshift  = 54;
  k_star    = 55;
  k_alt     = 56;
  k_space   = 57;
  k_caps    = 58;
  k_f1      = 59;
  k_f2      = 60;
  k_f3      = 61;
  k_f4      = 62;
  k_f5      = 63;
  k_f6      = 64;
  k_f7      = 65;
  k_f8      = 66;
  k_f9      = 67;
  k_f10     = 68;
  k_numlock = 69;
  k_scrlock = 70;
  k_home    = 71;
  k_up      = 72;
  k_pgup    = 73;
  k_kminus  = 74;
  k_left    = 75;
  k_k5      = 76;
  k_right   = 77;
  k_kplus   = 78;
  k_end     = 79;
  k_down    = 80;
  k_pgdn    = 81;
  k_ins     = 82;
  k_del     = 83;
  k_f11     = 87;
  k_f12     = 88;
  KB_STATE_ARRAY_SIZE = 100;

dataseg

global  kb:byte:KB_STATE_ARRAY_SIZE

global  Key:word
global	Buttons:word
global	MouseX:word
global	MouseY:word
global	Button:word
global	GotMouse:word
global	NKey:word

codeseg

global	ms_init:proc
global	sd_KbdTask:proc
global	SetKbdTask:proc
global	OffKbdTask:proc
global	ms_show:proc
global	ms_hide:proc
global	Keys:proc
