**** АДАПТИРОВАНО ДЛЯ xHarbour, приведено к обычным кодам, 
*   чтобы безболезненно подменить KeySend на hb_keyput
*
*    CTSCAN.CH
*
*
**********************************************************************


#define 	KS_DISABLE		  CHR(255) + CHR(255)


* Letters and Numbers
*
#define 	KS_A	"A"
#define 	KS_B	"B"		  
#define   KS_C          "C"
#define   KS_D          "D"
#define   KS_E          "E"
#define   KS_F          "F"
#define   KS_G          "G"
#define   KS_H          "H"
#define   KS_I          "I"
#define   KS_J          "J"
#define   KS_K          "K"
#define   KS_L          "L"
#define   KS_M          "M"
#define   KS_N          "N"
#define   KS_O          "O"
#define   KS_P          "P"
#define   KS_Q          "Q"
#define   KS_R          "R"
#define   KS_S          "S"
#define   KS_T          "T"
#define   KS_U          "U"
#define   KS_V          "V"
#define   KS_W          "W"
#define   KS_X          "X"
#define   KS_Y          "Y"
#define   KS_Z          "Z"

#define   KS_a          "a"
#define   KS_b          "b"
#define   KS_c          "c"
#define   KS_d          "d"
#define   KS_e          "e"
#define   KS_f          "f"
#define   KS_g          "g"
#define   KS_h          "h"
#define   KS_i          "i"
#define   KS_j          "j"
#define   KS_k          "k"
#define   KS_l          "l"
#define   KS_m          "m"
#define   KS_n          "n"
#define   KS_o          "o"
#define   KS_p          "p"
#define   KS_q          "q"
#define   KS_r          "r"
#define   KS_s          "s"
#define   KS_t          "t"
#define   KS_u          "u"
#define   KS_v          "v"
#define   KS_w          "w"
#define   KS_x          "x"
#define   KS_y          "y"
#define   KS_z          "z"

#define   KS_1          "1"
#define   KS_2          "2"
#define   KS_3          "3"
#define   KS_4          "4"
#define   KS_5          "5"
#define   KS_6          "6"
#define   KS_7          "7"
#define   KS_8          "8"
#define   KS_9          "9"
#define   KS_0          "0"


* Letters and Numbers
*
#define   KS_CTRL_A      513     
#define   KS_CTRL_B      514     
#define   KS_CTRL_C      515     
#define   KS_CTRL_D      516     
#define   KS_CTRL_E      517     
#define   KS_CTRL_F      518     
#define   KS_CTRL_G      519     
#define   KS_CTRL_H      520     
#define   KS_CTRL_I      521     
#define   KS_CTRL_J      522     
#define   KS_CTRL_K      523      
#define   KS_CTRL_L      524      
#define   KS_CTRL_M      525      
#define   KS_CTRL_N      526      
#define   KS_CTRL_O      527      
#define   KS_CTRL_P      528      
#define   KS_CTRL_Q      529     
#define   KS_CTRL_R      530      
#define   KS_CTRL_S      531      
#define   KS_CTRL_T      532      
#define   KS_CTRL_U      533      
#define   KS_CTRL_V      534      
#define   KS_CTRL_W      535      
#define   KS_CTRL_X      536      
#define   KS_CTRL_Y      537      
#define   KS_CTRL_Z      538      

#define   KS_ALT_A      286
#define   KS_ALT_B      304
#define   KS_ALT_C      302
#define   KS_ALT_D      288
#define   KS_ALT_E      274
#define   KS_ALT_F      289
#define   KS_ALT_G      290
#define   KS_ALT_H      291
#define   KS_ALT_I      279
#define   KS_ALT_J      292
#define   KS_ALT_K      293
#define   KS_ALT_L      294
#define   KS_ALT_M      306
#define   KS_ALT_N      305
#define   KS_ALT_O      280
#define   KS_ALT_P      281
#define   KS_ALT_Q      272
#define   KS_ALT_R      275
#define   KS_ALT_S      287
#define   KS_ALT_T      276
#define   KS_ALT_U      278
#define   KS_ALT_V      303
#define   KS_ALT_W      273
#define   KS_ALT_X      301
#define   KS_ALT_Y      277
#define   KS_ALT_Z      300
#define   KS_ALT_1      376
#define   KS_ALT_2      377
#define   KS_ALT_3      378
#define   KS_ALT_4      379
#define   KS_ALT_5      380
#define   KS_ALT_6      381
#define   KS_ALT_7      382
#define   KS_ALT_8      383
#define   KS_ALT_9      384
#define   KS_ALT_0      385


* Twelve function keys          
*
#define   KS_F1         28
#define   KS_F2         -1
#define   KS_F3         -2
#define   KS_F4         -3
#define   KS_F5         -4
#define   KS_F6         -5
#define   KS_F7         -6
#define   KS_F8         -7
#define   KS_F9         -8
#define   KS_F10        -9
#define   KS_F11        -40
#define   KS_F12        -41

#define   KS_SH_F1      -10
#define   KS_SH_F2      -11
#define   KS_SH_F3      -12
#define   KS_SH_F4      -13
#define   KS_SH_F5      -14
#define   KS_SH_F6      -15
#define   KS_SH_F7      -16
#define   KS_SH_F8      -17
#define   KS_SH_F9      -18
#define   KS_SH_F10     -19
#define   KS_SH_F11     -42
#define   KS_SH_F12     -43

#define   KS_CTRL_F1    -20
#define   KS_CTRL_F2    -21
#define   KS_CTRL_F3    -22
#define   KS_CTRL_F4    -23
#define   KS_CTRL_F5    -24
#define   KS_CTRL_F6    -25
#define   KS_CTRL_F7    -26
#define   KS_CTRL_F8    -27
#define   KS_CTRL_F9    -28
#define   KS_CTRL_F10   -29
#define   KS_CTRL_F11   -44
#define   KS_CTRL_F12   -45

#define   KS_ALT_F1     -30
#define   KS_ALT_F2     -31
#define   KS_ALT_F3     -32
#define   KS_ALT_F4     -33
#define   KS_ALT_F5     -34
#define   KS_ALT_F6     -35
#define   KS_ALT_F7     -36
#define   KS_ALT_F8     -37
#define   KS_ALT_F9     -38
#define   KS_ALT_F10    -39
#define   KS_ALT_F11    -46
#define   KS_ALT_F12    -47


* Backspace, ESC            
*
#define   KS_BS         CHR(8)
#define   KS_ESC        CHR(27)
#define   KS_TAB        CHR(9)
#define   KS_SH_TAB     271
                        
#define   KS_ALT_BS     270
#define   KS_ALT_ESC    257
#define   KS_ALT_TAB    421


* The various combinat
*
#define   KS_ENTER       CHR(13)
#define   KS_CTRL_ENTE   CHR(10)
#define   KS_ALT_ENTER  284
#define   KS_PAD_ENTER   CHR(13)
#define   KS_PAD_CTRL_   CHR(0)
#define   KS_PAD_ALT_E   CHR(0)


* Separate cursor bloc
*
#define   KS_INS          CHR(22)
#define   KS_DEL          CHR(7)
#define   KS_HOME         CHR(1)
#define   KS_END          CHR(6)
#define   KS_PGUP         CHR(18)
#define   KS_PGDN         CHR(3)
#define   KS_UP           CHR(5)
#define   KS_LEFT         CHR(19)
#define   KS_DOWN         CHR(24)
#define   KS_RIGHT        CHR(4)

#define   KS_CTRL_INS     402
#define   KS_CTRL_DEL     403
#define   KS_CTRL_HOME    29
#define   KS_CTRL_END     23
#define   KS_CTRL_PGUP    31
#define   KS_CTRL_PGDN    CHR(30)
#define   KS_CTRL_UP      397
#define   KS_CTRL_LEFT    CHR(26)
#define   KS_CTRL_DOWN    401
#define   KS_CTRL_RIGH    CHR(2)

#define   KS_ALT_INS     418
#define   KS_ALT_DEL     419
#define   KS_ALT_HOME    407
#define   KS_ALT_END     415
#define   KS_ALT_PGUP    409
#define   KS_ALT_PGDN    417
#define   KS_ALT_UP      408
#define   KS_ALT_LEFT    411
#define   KS_ALT_DOWN    416
#define   KS_ALT_RIGHT   413


* Cursor-Block / NumPa
*
#define   KS_PAD_INS     CHR(22)
#define   KS_PAD_DEL     CHR(7)
#define   KS_PAD_HOME    CHR(1)
#define   KS_PAD_END     CHR(6)
#define   KS_PAD_PGUP    CHR(18)
#define   KS_PAD_PGDN    CHR(3)
#define   KS_PAD_UP      CHR(5)
#define   KS_PAD_LEFT    CHR(19)
#define   KS_PAD_DOWN    CHR(24)
#define   KS_PAD_RIGHT   CHR(4)

#define   KS_CTRL_PAD_INS   402
#define   KS_CTRL_PAD_DEL   403
#define   KS_CTRL_PAD_HOME  29
#define   KS_CTRL_PAD_END   23
#define   KS_CTRL_PAD_PGUP  31
#define   KS_CTRL_PAD_PGDN  30
#define   KS_CTRL_PAD_UP    397
#define   KS_CTRL_PAD_LEFT  26
#define   KS_CTRL_PAD_DOWN  401
#define   KS_CTRL_PAD_RIGHT 2
*
* There are no separate KS_ALT_Pe no separate KS_ALT_PAD_<cursor key> codes!


* The gray keys in the numeric k keys in the numeric key pad.
*
#define   KS_PAD_DIV            "/"
#define   KS_PAD_MUL            "*"
#define   KS_PAD_MINUS          "-"
#define   KS_PAD_PLUS           "+"

#define   KS_CTRL_PAD_DIV       405
#define   KS_CTRL_PAD_MUL       406
#define   KS_CTRL_PAD_MINUS     398
#define   KS_CTRL_PAD_PLUS      400

#define   KS_ALT_PAD_DIV        420
#define   KS_ALT_PAD_MUL        311
#define   KS_ALT_PAD_MINUS      330
#define   KS_ALT_PAD_PLUS       334


* Numeric block keys, like perioblock keys, like period and comma
*
#define   KS_PAD_1     "1"
#define   KS_PAD_2     "2"
#define   KS_PAD_3     "3"
#define   KS_PAD_4     "4"
#define   KS_PAD_5     "5"
#define   KS_PAD_6     "6"
#define   KS_PAD_7     "7"
#define   KS_PAD_8     "8"
#define   KS_PAD_9     "9"
#define   KS_PAD_0     "0"

#define   KS_PAD_DECIMAL  "."

#define   KS_DOT          "."
#define   KS_COMMA        ","

