home *** CD-ROM | disk | FTP | other *** search
- ..pgno01
- ..foot60AB-##
- ..head02L──────────────────────────────────────────────────────────────────────
- ..head04L──────────────────────────────────────────────────────────────────────
- ..head03LKeyBoard Return Codes
-
- This appendix lists the keyboard codes for all the key combinations
- for the entire keyboard, as they are seen by the function ReadKbd.
- All keys are turned into either a one or two character code.
-
- To understand the table below assume St is a two character string.
- St[0] is the length of the character code returned. If the length of
- St is one then a normal ASCII character was pressed, otherwise an
- extended code is generated. Notice that some of the keyboard codes do
- produce a two character code with the first character being null.
-
- If the length of St is one then a normal ASCII character code was read
- from the keyboard. This covers the ASCII values 32-127.
-
- If the length of St is two then one of the keys that are usually used
- for cursor control was read from the keyboard. If this is the case
- then St[1] will be either a 0 or 27 depending on the key combination
- read from the keyboard.
-
- Use of the switch statement works well with this type of setup to
- determine which keyboard keys were read.
-
- switch Ch[1] {
- case 0 : printf( "Control code used." );
- case 27 : printf( "Control code used." );
- default : if ( Ch[1] >= 32 && Ch[1] <= 127 )
- printf( "Printable code used." );
- };
-
-
- Key Key
- Pressed CH[0] CH[1] CH[2] Pressed CH[0] CH[1] CH[2]
- --------- ----- ----- ----- --------- ----- ----- -----
- (space) 1 32 0 0 1 48 0
- ! 1 33 0 1 1 49 0
- " 1 34 0 2 1 50 0
- # 1 35 0 3 1 51 0
- $ 1 36 0 4 1 52 0
- % 1 37 0 5 1 53 0
- & 1 38 0 6 1 54 0
- ' 1 39 0 7 1 55 0
- ( 1 40 0 8 1 56 0
- ) 1 41 0 9 1 57 0
- * 1 42 0 : 1 58 0
- + 1 43 0 ; 1 59 0
- , 1 44 0 < 1 60 0
- - 1 45 0 = 1 61 0
- . 1 46 0 > 1 62 0
- / 1 47 0 ? 1 63 0
- ..page
- ..head02
- ..head03
- ..head04
- Key Key
- Pressed CH[0] CH[1] CH[2] Pressed CH[0] CH[1] CH[2]
- --------- ----- ----- ----- --------- ----- ----- -----
- @ 1 64 0 p 1 112 0
- A 1 65 0 q 1 113 0
- B 1 66 0 r 1 114 0
- C 1 67 0 s 1 115 0
- D 1 68 0 t 1 116 0
- E 1 69 0 u 1 117 0
- F 1 70 0 v 1 118 0
- G 1 71 0 w 1 119 0
- H 1 72 0 x 1 120 0
- I 1 73 0 y 1 121 0
- J 1 74 0 z 1 122 0
- K 1 75 0 { 1 123 0
- L 1 76 0 | 1 124 0
- M 1 77 0 } 1 125 0
- N 1 78 0 ~ 1 126 0
- O 1 79 0 Ctrl-Break 2 27 0
- P 1 80 0 Esc 2 27 1
- Q 1 81 0 Ctrl-2 2 27 3
- R 1 82 0 BackSp 2 27 8
- S 1 83 0 Tab 2 27 9
- T 1 84 0 Ctrl-Enter 2 27 10
- U 1 85 0 Enter 2 27 13
- V 1 86 0 Ctrl-BS 2 27 14
- W 1 87 0 Shft-Tab 2 27 15
- X 1 88 0 Alt-Q 2 27 16
- Y 1 89 0 Alt-W 2 27 17
- Z 1 90 0 Alt-E 2 27 18
- [ 1 91 0 Alt-R 2 27 19
- \ 1 92 0 Alt-T 2 27 20
- ] 1 93 0 Alt-Y 2 27 21
- ^ 1 94 0 Alt-U 2 27 22
- _ 1 95 0 Alt-I 2 27 23
- ` 1 96 0 Alt-O 2 27 24
- a 1 97 0 Alt-P 2 27 25
- b 1 98 0 Alt-A 2 27 30
- c 1 99 0 Alt-S 2 27 31
- d 1 100 0 Alt-D 2 27 32
- e 1 101 0 Alt-F 2 27 33
- f 1 102 0 Alt-G 2 27 34
- g 1 103 0 Alt-H 2 27 35
- h 1 104 0 Alt-J 2 27 36
- i 1 105 0 Alt-K 2 27 37
- j 1 106 0 Alt-L 2 27 38
- k 1 107 0 Alt-Z 2 27 44
- l 1 108 0 Alt-X 2 27 45
- m 1 109 0 Alt-C 2 27 46
- n 1 110 0 Alt-V 2 27 47
- o 1 111 0 Alt-B 2 27 48
- ..page
- Key Key
- Pressed Ch[0] Ch[1] Ch[2] Pressed Ch[0] Ch[1] Ch[2]
- --------- ----- ----- ----- --------- ----- ----- -----
- Alt-N 2 27 49 Alt-F7 2 27 110
- Alt-M 2 27 50 Alt-F8 2 27 111
- F1 2 27 59 Alt-F9 2 27 112
- F2 2 27 60 Alt-F10 2 27 113
- F3 2 27 61 Ctrl-LArr 2 27 115
- F4 2 27 62 Ctrl-RArr 2 27 116
- F5 2 27 63 Ctrl-End 2 27 117
- F6 2 27 64 Ctrl-PgDn 2 27 118
- F7 2 27 65 Ctrl-Home 2 27 119
- F8 2 27 66 Alt-1 2 27 120
- F9 2 27 67 Alt-2 2 27 121
- F10 2 27 68 Alt-3 2 27 122
- Home 2 27 71 Alt-4 2 27 123
- UArr 2 27 72 Alt-5 2 27 124
- PgUp 2 27 73 Alt-6 2 27 125
- LArr 2 27 75 Alt-7 2 27 126
- RArr 2 27 77 Alt-8 2 27 127
- End 2 27 79 Alt-9 2 27 128
- DArr 2 27 80 Alt-0 2 27 129
- PgDn 2 27 81 Alt-- 2 27 130
- Ins 2 27 82 Alt-= 2 27 131
- Del 2 27 83 Ctrl-PgUp 2 27 132
- Shft-F1 2 27 84 Ctrl-A 2 0 1
- Shft-F2 2 27 85 Ctrl-B 2 0 2
- Shft-F3 2 27 86 Ctrl-C 2 0 3
- Shft-F4 2 27 87 Ctrl-D 2 0 4
- Shft-F5 2 27 88 Ctrl-E 2 0 5
- Shft-F6 2 27 89 Ctrl-F 2 0 6
- Shft-F7 2 27 90 Ctrl-G 2 0 7
- Shft-F8 2 27 91 Ctrl-H 2 0 8
- Shft-F9 2 27 92 Ctrl-I 2 0 9
- Shft-F10 2 27 93 Ctrl-J 2 0 10
- Ctrl-F1 2 27 94 Ctrl-K 2 0 11
- Ctrl-F2 2 27 95 Ctrl-L 2 0 12
- Ctrl-F3 2 27 96 Ctrl-M 2 0 13
- Ctrl-F4 2 27 97 Ctrl-N 2 0 14
- Ctrl-F5 2 27 98 Ctrl-O 2 0 15
- Ctrl-F6 2 27 99 Ctrl-P 2 0 16
- Ctrl-F7 2 27 100 Ctrl-Q 2 0 17
- Ctrl-F8 2 27 101 Ctrl-R 2 0 18
- Ctrl-F9 2 27 102 Ctrl-S 2 0 19
- Ctrl-F10 2 27 103 Ctrl-T 2 0 20
- Alt-F1 2 27 104 Ctrl-U 2 0 21
- Alt-F2 2 27 105 Ctrl-V 2 0 22
- Alt-F3 2 27 106 Ctrl-W 2 0 23
- Alt-F4 2 27 107 Ctrl-X 2 0 24
- Alt-F5 2 27 108 Ctrl-Y 2 0 25
- Alt-F6 2 27 109 Ctrl-Z 2 0 26
- ..page
- Key
- Pressed Ch[0] Ch[1] Ch[2]
- --------- ----- ----- -----
- Ctrl-[ 2 0 27
- Ctrl-\ 2 0 28
- Ctrl-] 2 0 29
- Ctrl-6 2 0 30
- Ctrl-- 2 0 31
- ..page
-