hello,
somone else might know of a way to do this, but in DOS most of the F-keys are already assigned to commands related to that system.
for example F3 repeats the last DOS command you used (i.e. dir/w gives you a wide view of your current directory, if you hit F3 it repeats the command dir/w and waits for you to hit enter)
those command overrides, which is what you are wanting to do, are usually scripted into the programs when created. You can download a program called
F-Keys 1.3 which will allow you assign keys, its a TSR (To Stay Resident) Program and is shareware so there could be a fee associated with it to unlock its full potential.
below I have listed what the current assignments for the F-Keys.
F1: Repeats the letters of the last command line, one by one
F2: Displays a dialog asking user to "enter the char to copy up to" of the last command line
F3: Repeats the last command line
F4: Displays a dialog asking user to "enter the char to delete up to" of the last command line
F5: Goes back one command line
F6: Enters the traditional CTRL+Z (^z)
F7: Displays a menu with the command line history
F8: Cycles back through previous command lines (beginning with most recent)
F9: Displays a dialog asking user to enter a command number, where 0 is for first command line entered
F10: Unassigned
F11: Unassigned
F12: Unassigned