OK, want to make sure I understand this correctly.
So, basically, when using getch(), the F keys just return simple pair of decimal values. If I wanted to check to see if, for example, the F1 key was pressed, I would compare it to that simple int value.
Code:
if (keystroke == 059)
{
// action here
}
After your post, I went ahead and googled "keyboard scan codes" "scan codes". There's also a hex value for the functions keys. If I were to compare using hex values, would it be the same, just reading the keystroke in to a string instead? I hope I haven't completely confused you with my response.
If these are the dec and hex values for the function keys, how would I go about checking for them since they are in pairs?
Code:
F1 (00,59) (0x00,0x3b) F2 (00,60) (0x00,0x3c)
F3 (00,61) (0x00,0x3d) F4 (00,62) (0x00,0x3e)
F5 (00,63) (0x00,0x3f) F6 (00,64) (0x00,0x40)
F7 (00,65) (0x00,0x41) F8 (00,66) (0x00,0x42)
F9 (00,67) (0x00,0x43) F10 (00,68) (0x00,0x44)
F11 (00,133) (0x00,0x85) F12 (00,134) (0x00,0x86)