[OT] ASCII Code for Functions Keys (F1-F12) and TAB key

[OT] ASCII Code for Functions Keys (F1-F12) and TAB key

Post by Mike Wahle » Wed, 10 Sep 2003 01:43:22



Please don't post off-topic material here.

What you've written is wrong anyway. ASCII
(a standardized character set) has no characters
called 'F1', 'F2', etc.


The values 112 through 122 are the ASCII encodings for the
lowercase characters 'p' through 'z'; 123 is the ASCII
encoding for the character '{'

For other character sets, these values can and do
have different meanings. That's why standard C++
programs should never depend upon character encodings
but use character literals to express character values.

Finally, standard C++ has no notion of 'function keys',
'keys', 'keyboards' or any other particular hardware
device. All i/o is abstracted as 'streams of characters'.

-Mike