Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>appendix a</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Appendix A
 Key Codes
------------------------------------------------------------------------------
     When using the DSETKBIOS( ), KBDEMULATE( ), KEYSEND( ), KEYREAD( ),
     GETKXLAT( ), GETKXTAB( ), and SCANKEY( ) functions use of the symbols
     defined in the CTSCAN.CH header file is recommended for key codes.
     After installation, you will find this file in the <ClipperRoot>\INCLUDE
     directory.

     By converting the coding used in the CA-Clipper Tools release from
     Summer '87 to BIOS coding, CA-Clipper keyboard functions now offer even
     greater capabilities.  In this way keys can be handled that could not be
     differentiated before.  For example, the decimal key on the numeric key
     pad of an extended keyboard has an ASCII value of 46 and a scan code of
     83, while the period key in the alpha field also has an ASCII value of
     46, but returns a scan code of 52.

     For compatibility reasons the previous system for key codes can also be
     used.  To do this you must link either the #include CT.CH file, or the
     EXTERNAL_S87KEYS statement contained therein.  This old system should
     however only be used for existing applications and is not recommended
     for the use in new applications.

 Symbolic constants for keys are coded as follows:

     <RootName>_[<ShiftStateKey>]_[<NumBlock>]_<Keyname>

     Where the following applies:

     <RootName>:        KS (for keyboard scan)
     <ShiftStateKey>:   CTRL, ALT, SHIFT
     <NumBlock>:        PAD
     <Keyname>:         a-Z, 0-9, F1-F12, etc.

 Examples:

     KS_A               KS_ALT_F1
     KS_PAD_ENTER       KS_CTRL_PAD_DIV
     KS_CTRL_B          KS_SH_F12
     KS_PAD_MUL         KS_ALT_PAD_MINUS

     Appendix Table A-1:  Letters and Numbers
     ------------------------------------------------------------------------
     Key    ASCII    Scan     Symb.
     Name   Code     Code     Const.
     ------------------------------------------------------------------------
     A       65      30       KS_A
     B       66      48       KS_B
     C       67      46       KS_C
     D       68      32       KS_D
     E       69      18       KS_E
     F       70      33       KS_F
     G       71      34       KS_G
     H       72      35       KS_H
     I       73      23       KS_I
     J       74      36       KS_J
     K       75      37       KS_K
     L       76      38       KS_L
     M       77      50       KS_M
     N       78      49       KS_N
     O       79      24       KS_O
     P       80      25       KS_P
     Q       81      16       KS_Q
     R       82      19       KS_R
     S       83      31       KS_S
     T       84      20       KS_T
     U       85      22       KS_U
     V       86      47       KS_V
     W       87      17       KS_W
     X       88      45       KS_X
     Y       89      44       KS_Y
     Z       90      21       KS_Z
     a       97      30       KS_a
     b       98      48       KS_b
     c       99      46       KS_c
     d       100     32       KS_d
     e       101     18       KS_e
     f       102     33       KS_f
     g       103     34       KS_g
     h       104     35       KS_h
     i       105     23       KS_i
     j       106     36       KS_j
     k       107     37       KS_k
     l       108     38       KS_l
     m       109     50       KS_m
     n       110     49       KS_n
     o       111     24       KS_o
     p       112     25       KS_p
     q       113     16       KS_q
     r       114     19       KS_r
     s       115     31       KS_s
     t       116     20       KS_t
     u       117     22       KS_u
     v       118     47       KS_v
     w       119     17       KS_w
     x       120     45       KS_x
     y       121     44       KS_y
     z       122     44       KS_z
     1       49      2        KS_1
     2       50      3        KS_2
     3       51      4        KS_3
     4       52      5        KS_4
     5       53      6        KS_5
     6       54      7        KS_6
     7       55      8        KS_7
     8       56      9        KS_8
     9       57      10       KS_9
     0       48      11       KS_0
     ------------------------------------------------------------------------

     Appendix Table A-2:  Letters and Numbers with CTRL & ALT
     ------------------------------------------------------------------------
     Key          ASCII   Scan     Symb.
     Name         Code    Code     Const.
     ------------------------------------------------------------------------
     CTRL+A       1       30       KS_CTRL_A
     CTRL+B       2       48       KS_CTRL_B
     CTRL+C       3       46       KS_CTRL_C
     CTRL+D       4       32       KS_CTRL_D
     CTRL+E       5       18       KS_CTRL_E
     CTRL+F       6       33       KS_CTRL_F
     CTRL+G       7       34       KS_CTRL_G
     CTRL+H       8       35       KS_CTRL_H
     CTRL+I       9       23       KS_CTRL_I
     CTRL+M       13      50       KS_CTRL_M
     CTRL+N       14      49       KS_CTRL_N
     CTRL+R       18      19       KS_CTRL_R
     CTRL+S       19      31       KS_CTRL_S
     CTRL+T       20      20       KS_CTRL_T
     CTRL+U       21      22       KS_CTRL_U
     CTRL+V       22      47       KS_CTRL_V
     CTRL+W       23      17       KS_CTRL_W
     CTRL+X       24      45       KS_CTRL_X
     CTRL+Y       25      44       KS_CTRL_Y
     CTRL+Z       26      21       KS_CTRL_Z
     ALT+A        0       30       KS_ALT_A
     ALT+B        0       48       KS_ALT_B
     ALT+C        0       46       KS_ALT_C
     ALT+D        0       32       KS_ALT_D
     ALT+E        0       18       KS_ALT_E
     ALT+F        0       33       KS_ALT_F
     ALT+G        0       34       KS_ALT_G
     ALT+H        0       35       KS_ALT_H
     ALT+I        0       23       KS_ALT_I
     ALT+J        0       36       KS_ALT_J
     ALT+K        0       37       KS_ALT_K
     ALT+L        0       38       KS_ALT_L
     ALT+M        0       50       KS_ALT_M
     ALT+N        0       49       KS_ALT_N
     ALT+O        0       24       KS_ALT_O
     ALT+P        0       25       KS_ALT_P
     ALT+Q        0       16       KS_ALT_Q
     ALT+R        0       19       KS_ALT_R
     ALT+S        0       31       KS_ALT_S
     ALT+T        0       20       KS_ALT_T
     ALT+U        0       22       KS_ALT_U
     ALT+V        0       47       KS_ALT_V
     ALT+W        0       17       KS_ALT_W
     ALT+X        0       45       KS_ALT_X
     ALT+Y        0       21       KS_ALT_Y
     ALT+Z        0       44       KS_ALT_Z
     ALT+1        0       120      KS_ALT_1
     ALT+2        0       121      KS_ALT_2
     ALT+3        0       122      KS_ALT_3
     ALT+4        0       123      KS_ALT_4
     ALT+5        0       124      KS_ALT_5
     ALT+6        0       125      KS_ALT_6
     ALT+7        0       126      KS_ALT_7
     ALT+8        0       127      KS_ALT_8
     ALT+9        0       128      KS_ALT_9
     ALT+0        0       129      KS_ALT_0
     ------------------------------------------------------------------------

     Appendix Table A-3:  Function keys/all combinations
     ------------------------------------------------------------------------
     Key          ASCII   Scan     Symb.
     Name         Code    Code     Const.
     ------------------------------------------------------------------------
     F1           0       59       KS_F1
     F2           0       60       KS_F2
     F3           0       61       KS_F3
     F4           0       62       KS_F4
     F5           0       63       KS_F5
     F6           0       64       KS_F6
     F7           0       65       KS_F7
     F8           0       66       KS_F8
     F9           0       67       KS_F9
     F10          0       68       KS_F10
     F11          0       133      KS_F11
     F12          0       134      KS_F12
     SHIFT+F1     0       84       KS_SH_F2
     SHIFT+F2     0       85       KS_SH_F2
     SHIFT+F3     0       86       KS_SH_F3
     SHIFT+F4     0       87       KS_SH_F4
     SHIFT+F5     0       88       KS_SH_F5
     SHIFT+F6     0       89       KS_SH_F6
     SHIFT+F7     0       90       KS_SH_F7
     SHIFT+F8     0       91       KS_SH_F8
     SHIFT+F9     0       92       KS_SH_F9
     SHIFT+F10    0       93       KS_SH_F10
     SHIFT+F11    0       135      KS_SH_F11
     SHIFT+F12    0       136      KS_SH_F12
     CTRL+F1      0       94       KS_CTRL_F1
     CTRL+F2      0       95       KS_CTRL_F2
     CTRL+F3      0       96       KS_CTRL_F3
     CTRL+F4      0       97       KS_CTRL_F4
     CTRL+F5      0       98       KS_CTRL_F5
     CTRL+F6      0       99       KS_CTRL_F6
     CTRL+F7      0       100      KS_CTRL_F7
     CTRL+F8      0       101      KS_CTRL_F8
     CTRL+F9      0       102      KS_CTRL_F9
     CTRL+F10     0       103      KS_CTRL_F10
     CTRL+F11     0       137      KS_CTRL_F11
     CTRL+F12     0       138      KS_CTRL_F12
     ALT+F1       0       104      KS_ALT_F1
     ALT+F2       0       105      KS_ALT_F2
     ALT+F3       0       106      KS_ALT_F3
     ALT+F4       0       107      KS_ALT_F4
     ALT+F5       0       108      KS_ALT_F5
     ALT+F6       0       109      KS_ALT_F6
     ALT+F7       0       110      KS_ALT_F7
     ALT+F8       0       111      KS_ALT_F8
     ALT+F9       0       112      KS_ALT_F9
     ALT+F10      0       113      KS_ALT_F10
     ALT+F11      0       139      KS_ALT_F11
     ALT+F12      0       140      KS_ALT_F12
     ------------------------------------------------------------------------

     Appendix Table A-4:  Backspace, ESC, and TAB
     ------------------------------------------------------------------------
     Key          ASCII   Scan     Symb.
     Name         Code    Code     Const.
     ------------------------------------------------------------------------
     BS           8       14       KS_BS
     ESC          27      1        KS_ESC
     TAB          9       15       KS_TAB
     SHIFT+TAB    0       15       KS_SH_TAB
     ALT+BS       0       14       KS_ALT_BS
     ALT+ESC      0       1        KS_ALT_ESC
     ALT+TAB      0       165      KS_ALT_TAB
     ------------------------------------------------------------------------

     Appendix Table A-5:  Combinations with ENTER
     ------------------------------------------------------------------------
     Key               ASCII   Scan     Symb.
     Name              Code    Code     Const.
     ------------------------------------------------------------------------
     ENTER             13      28       KS_ENTER
     CTRL+ENTER        10      28       KS_CTRL_ENTER
     ALT+ENTER         0       28       KS_ALT_ENTER
     PAD-ENTER         13      224      KS_PAD_ENTER
     CTRL+PAD-ENTER    10      224      KS_CTRL_PAD_ENTER
     ALT+PAD-ENTER     0       166      KS_ALT_PAD_ENTER
     ------------------------------------------------------------------------

     Appendix Table A-6:  Cursor block/Numeric Key Pad
     ------------------------------------------------------------------------
     Key               ASCII   Scan     Symb.
     Name              Code    Code     Const.
     ------------------------------------------------------------------------
     INS               224     82       KS_INS
     DEL               224     83       KS_DEL
     HOME              224     71       KS_HOME
     END               224     79       KS_END
     PAGE UP           224     73       KS_PGUP
     PAGE DOWN         224     81       KS_PGDN
     <Up arrow>        224     72       KS_UP
     <-                224     75       KS_LEFT
     <Down arrow>      224     80       KS_DOWN
     ->                224     77       KS_RIGHT
     CTRL+INS          224     146      KS_CTRL_INS
     CTRL+DEL          224     147      KS_CTRL_DEL
     CTRL+HOME         224     119      KS_CTRL_HOME
     CTRL+END          224     117      KS_CTRL_END
     CTRL+PAGE UP      224     132      KS_CTRL_PGUP
     CTRL+PAGE DOWN    224     118      KS_CTRL_PGDN
     CTRL+<Up arrow>   224     141      KS-CTRL_UP
     CTRL+<-           224     115      KS_CTRL_LEFT
     CTRL+<Dn arrow>   224     145      KS_CTRL_DOWN
     CTRL+->           224     116      KS_CTRL_RIGHT
     ------------------------------------------------------------------------

     There are no separate KS_ALT_<grey cursor keys> codes!

     Appendix Table A-7: Cursor Block (grey cursor keys)
     ------------------------------------------------------------------------
     Key               ASCII   Scan     Symb.
     Name              Code    Code     Const.
     ------------------------------------------------------------------------
     PAD-INS           0       82       KS_PAD_INS
     PAD-DEL           0       83       KS_PAD_DEL
     PAD-HOME          0       71       KS_PAD_HOME
     PAD-END           0       79       KS_PAD_END
     PAD-PAGE UP       0       73       KS_PAD_PGUP
     PAD-PAGE DOWN     0       81       KS_PAD_PGDN
     PAD-<Up arrow>    0       72       KS_PAD_UP
     PAD-<-            0       75       KS_PAD_LEFT
     PAD-<Down arrow>  0       80       KS_PAD_DOWN
     PAD-->            0       77       KS_PAD_RIGHT
     CTRL+PAD-INS      0       146      KS_CTRL_PAD_INS
     CTRL+PAD-DEL      0       147      KS_CTRL_PAD_DEL
     CTRL+PAD-HOME     0       119      KS_CTRL_PAD_HOME
     CTRL+PAD-END      0       117      KS_CTRL_PAD_END
     CTRL+PAD-PGUP     0       132      KS_CTRL_PAD_PGUP
     CTRL+PAD-PGDN     0       118      KS_CTRL_PAD_PGDN
     CTRL+PAD-<Uparr>  0       141      KS_CTRL_PAD_UP
     CTRL+PAD-<-       0       115      KS_CTRL_PAD_LEFT
     CTRL+PAD-<Dnarr>  0       145      KS_CTRL_PAD_DOWN
     CTRL+PAD-->       0       116      KS_CTRL_PAD_RIGHT
     ALT+PAD-INS       0       162      KS_ALT_PAD_INS
     ALT+PAT-DEL       0       163      KS_ALT_PAD_DEL
     ALT+PAD-HOME      0       151      KS_ALT_PAD_HOME
     ALT+PAD-END       0       159      KS_ALT_PAD_END
     ALT+PAD-PGUP      0       153      KS_ALT_PAD_PGUP
     ALT+PAD-PGDN      0       161      KS_ALT_PAD_PGDN
     ALT+PAD-<Uparr>   0       152      KS_ALT_PAD_UP
     ALT+PAD-<-        0       155      KS_ALT_PAD_LEFT
     ALT+PAD-<Dnarr>   0       160      KS_ALT_PAD_DOWN
     ALT+PAD-->        0       157      KS_ALT_PAD_RIGHT
     ------------------------------------------------------------------------

     Appendix Table A-8:  Numeric Block (grey cursor keys)
     ------------------------------------------------------------------------
     Key               ASCII   Scan     Symb.
     Name              Code    Code     Const.
     ------------------------------------------------------------------------
     PAD-DIV           47      224      KS_PAD_DIV
     PAD-MUL           42      55       KS_PAD_MUL
     PAD-MINUS         45      74       KS_PAD_MINUS
     PAD-PLUS          43      78       KS_PAD_PLUS
     CTRL+PAD-DIV      0       149      KS_CTRL_PAD_DIV
     CTRL+PAD-MUL      0       150      KS_CTRL_PAD_MUL
     CTRL+PAD-MINUS    0       142      KS_CTRL_PAD_MINUS
     CTRL+PAD-PLUS     0       144      KS_CTRL_PAD_PLUS
     ALT+PAD-DIV       0       164      KS_ALT_PAD_DIV
     ALT+PAD-MUL       0       55       KS_ALT_PAD_MUL
     ALT+PAD-MINUS     0       74       KS_ALT_PAD_MINUS
     ALT+PAD-PLUS      0       78       KS_ALT_PAD_PLUS
     ------------------------------------------------------------------------

     Appendix Table A-9:  Numeric Block/Period/Comma
     ------------------------------------------------------------------------
     Key               ASCII   Scan     Symb.
     Name              Code    Code     Const.
     ------------------------------------------------------------------------
     PAD_1             49      79       KS_PAD_1
     PAD_2             50      80       KS_PAD_2
     PAD_3             51      81       KS_PAD_3
     PAD_4             52      75       KS_PAD_4
     PAD_5             53      76       KS_PAD_5
     PAD_6             54      77       KS_PAD_6
     PAD_7             55      71       KS_PAD_7
     PAD_8             56      72       KS_PAD_8
     PAD_9             57      73       KS_PAD_9
     PAD_0             48      82       KS_PAD_0
     PAD_DECIMAL       44      83       KS_PAD_DECIMAL
     DOT               46      52       KS_PAD_DOT
     COMMA             44      51       KS_PAD_COMMA
     ------------------------------------------------------------------------


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson