The Macros tool allows you to make the function keys act as they were you typing a pre-defined string.
As you can see, the first step is to define the links by selecting Tools/Macros/Define:
In this screen, you can edit your macros. Note that the macros have a name, and that the value is the string that the key represents. In order to handle Control+ and Alt+ key combinations you can use:
In the example above, F12 would produce ALT+T and ALT+Q.