about ascii
youngjeff opened this issue · comments
youngjeff commented
I can't understand the ascii about left arrow, right arrow, up arrow and down arrow .
I just know letter D is 68,what about left arrow?
Maurits van der Schee commented
@youngjeff left arrow is in fact an extended character, mapping to "^[[D" or "27, 91, 68"
<?php
exec("stty -icanon"); // turn off input buffering
while (true) echo " ".ord(fgetc(STDIN)).",";
You can try the above PHP script on the command line and see it for yourself.