How do you trap the function keys (such as:F1, F2,....) on the keypress event? Or know when that key is pressed?

Or is there an ascii code for these function keys?
Plz reply, it's urgent
thanks.