ReadKey |
Lecture de touche |
Delphi / Free Pascal |
WinCrt |
Syntaxe
Description
Cette fonction permet de retourner une touche du tampon du clavier. Si une touche étendue ou de fonction a été enfoncée, le code ASCII zéro est renvoyé (#0). Vous pouvez ensuite lire le code de numérisation de la touche avec un deuxième appel ReadKey. La plupart des codes de touches d'une console DOS sont implémentés dans WinCrt, ainsi que de nombreux autres.
Voir ci-dessous pour une liste complète :
Touche |
Normal |
Shift |
Ctrl |
Alt |
A |
#97 |
#65 |
#1 |
#0#30 |
B |
#98 |
#66 |
#2 |
#0#48 |
C |
#99 |
#67 |
#3 |
#0#46 |
D
| #100 |
#68 |
#4 |
#0#32 |
E |
#101 |
#69 |
#5 |
#0#18 |
F |
#102 |
#70 |
#6 |
#0#33 |
G |
#103 |
#71 |
#7 |
#0#34 |
H |
#104 |
#72 |
#8 |
#0#35 |
I |
#105 |
#73 |
#9 |
#0#23 |
J |
#106 |
#74 |
#10 |
#0#36 |
K |
#107 |
#75 |
#11 |
#0#37 |
L |
#108 |
#76 |
#12 |
#0#38 |
M |
#109 |
#77 |
#13 |
#0#50 |
N |
#110 |
#78 |
#14 |
#0#49 |
O |
#111 |
#79 |
#15 |
#0#24 |
P |
#112 |
#80 |
#16 |
#0#25 |
Q |
#113 |
#81 |
#17 |
#0#16 |
R |
#114 |
#82 |
#18 |
#0#19 |
S |
#115 |
#83 |
#19 |
#0#31 |
T |
#116 |
#84 |
#20 |
#0#20 |
U |
#117 |
#85 |
#21 |
#0#22 |
V |
#118 |
#86 |
#22 |
#0#47 |
W |
#119 |
#87 |
#23 |
#0#17 |
X |
#120 |
#88 |
#24 |
#0#45 |
Y |
#121 |
#89 |
#25 |
#0#21 |
Z |
#122 |
#90 |
#26 |
#0#44 |
0 ) |
#48 |
#41 |
#0#10 |
#0#129 |
1 !
| #49 |
#33 |
#0#1 |
#0#120 |
2 @ |
#50 |
#64 |
#0#2 |
#0#121 |
3 # |
#51 |
#35 |
#0#3 |
#0#122 |
4 $ |
#52 |
#36 |
#0#4 |
#0#123 |
5 % |
#53 |
#37 |
#0#5 |
#0#124 |
6 ^ |
#54 |
#94 |
#0#6 |
#0#125 |
7 & |
#55 |
#38 |
#0#7 |
#0#126 |
8 * |
#56 |
#42 |
#0#8 |
#0#127 |
9 ( |
#57 |
#40 |
#0#9 |
#0#128 |
` ~ |
#96 |
#126 |
- |
- |
- _ |
#45 |
#95 |
- |
- |
= + |
#61 |
#43 |
- |
- |
\ | |
#92 |
#124 |
#28 |
- |
[ } |
#91 |
#123 |
#27 |
- |
] } |
#93 |
#125 |
#29 |
- |
; : |
#59 |
#58 |
- |
- |
' " |
#39 |
#34 |
- |
- |
, < |
#44 |
#60 |
- |
- |
. > |
#46 |
#62 |
- |
- |
/ ? |
#47 |
#63 |
- |
- |
Barre d'espacement |
#32 |
#32 |
#32 |
#0#11 |
Tab |
#9 |
#9 |
#30 |
- |
Caps Lock |
- |
- |
- |
- |
BackSpace |
#8 |
#8 |
#127 |
#0#14 |
Enter |
#13 |
#13 |
#10 |
#0#166 |
APP KEY |
#0#151 |
#0#151 |
#0#151 |
#0#151 |
Windows |
- |
- |
- |
- |
INS |
#0#82 |
#0#82 |
#0#146 |
#0#162 |
DEL |
#0#83 |
#0#83 |
#0#147 |
#0#163 |
HOME |
#0#71 |
#0#71 |
#0#119 |
#0#164 |
END |
#0#79 |
#0#79 |
#0#117 |
#0#165 |
PAGE UP |
#0#73 |
#0#73 |
#0#132 |
#0#153 |
PAGE DOWN |
#0#81 |
#0#81 |
#0#118 |
#0#161 |
↑ |
#0#72 |
#0#72 |
#0#141 |
#0#152 |
↓ |
#0#80 |
#0#80 |
#0#145 |
#0#160 |
← |
#0#75 |
#0#75 |
#0#115 |
#0#155 |
→ |
#0#77 |
#0#77 |
#0#116 |
#0#157 |
ESC |
#27 |
#27 |
- |
- |
F1 |
#0#59 |
#0#84 |
#0#94 |
#0#104 |
F2 |
#0#60 |
#0#85 |
#0#95 |
#0#105 |
F3 |
#0#61 |
#0#86 |
#0#96 |
#0#106 |
F4 |
#0#62 |
#0#87 |
#0#97 |
#0#107 |
F5 |
#0#63 |
#0#88 |
#0#98 |
#0#108 |
F6 |
#0#64 |
#0#89 |
#0#99 |
#0#109 |
F7 |
#0#65 |
#0#90 |
#0#100 |
#0#110 |
F8 |
#0#66 |
#0#91 |
#0#101 |
#0#111 |
F9 |
#0#67 |
#0#92 |
#0#102 |
#0#112 |
F10 |
#0#68 |
#0#93 |
#0#103 |
#0#113 |
F11 |
#0#133 |
#0#135 |
#0#137 |
#0#139 |
F12 |
#0#134 |
#0#136 |
#0#138 |
#0#140 |
Print Screen |
- |
- |
- |
- |
Scroll Lock |
- |
- |
#3 |
- |
PAUSE |
#0#12 |
#0#12 |
#3 |
#0#169 |
NUMPAD 0 |
#48 |
#0#82 |
- |
- |
NUMPAD 1 |
#49 |
#0#79 |
- |
- |
NUMPAD 2 |
#50 |
#0#80 |
- |
- |
NUMPAD 3 |
#51 |
#0#81 |
- |
- |
NUMPAD 4 |
#52 |
#0#75 |
- |
- |
NUMPAD 5 |
#53 |
#0#76 |
- |
- |
NUMPAD 6 |
#54 |
#0#77 |
- |
- |
NUMPAD 7 |
#55 |
#0#71 |
- |
- |
NUMPAD 8 |
#56 |
#0#72 |
- |
- |
NUMPAD 9 |
#57 |
#0#73 |
- |
- |
NUMPAD CLEAR |
#0#76 |
#0#76 |
#0#143 |
#0#76 |
NumLock |
- |
- |
- |
- |
NUMPAD / |
#47 |
#47 |
#0#148 |
#0#69 |
NUMPAD * |
#42 |
#42 |
#0#149 |
#0#70 |
NUMPAD - |
#45 |
#45 |
#0#142 |
#0#74 |
NUMPAD + |
#43 |
#43 |
#0#144 |
#0#78 |
NUMPAD ENTER |
#13 |
#13 |
#10 |
#0#166 |
NUMPAD DECIMAL |
#46 |
#0#83 |
#0#150 |
#0#114 |
Dernière mise à jour : Lundi, le 10 Juillet 2023