Action based on keyboard key

Hello;

Can I create event based on pressing some keys on the keyboard like F6 or F7 or ctrl+t or shift+>? How?
For example, I need to create an event on java script (same event when the field value is changed), when I am at child table row (for example at row 3) and if I pressed F7, then I need this event to be triggered because there is a code I need to run it. How?

Regards
Bilal