This is a classic Axapta problem.
It is as far as I know not possible to override Axapta shortcuts.
The suggested "SysSetupFormRun.task()" approach is not an option for your problem unless you want to use and override the existing Axapta tasks (e.g. New Record, Next Record ...)
The other suggested approach using TDC's DLL used in the SFC module is not an option either. What the DLL do is that it maps the F-keys with the appropiate ALT keys (e.g. F1 = ALT1, F2 = ALT2). Furthermore you can not catch the ALT keys anyway. They need to be Axapta auto generated shotcuts. This can be achieved on bottons but not in your grid.
So if you prefer to use the AFC DLL you need to create a button with a caption that automatically unserlines (auto shortcuts) a number (1 to 9).
I can suggest a possible solution to your problem though:
You need to have an ActiveX control that implements a Windows message hook wich triggers an event whenever a key is pressed. This event you will be able to handle in Axapta.
If you choose to write the ActiveX component yourself remember to forward the messages you hook to the system. Otherwise Axapta will not get the messages.
I also think you might run in to trouble or should I say that you should be aware that a Windows  messagehook can only take the actual Axapta instance as a parameter and not the Windows handle of your form thus you can only catch messages in Axapta general and not filter it to only be messages directed to your specific form.
If you're not able to write the ActiveX yourself try to find one on the internet.
You can start at
http://www.avenir.net/downloads/products/aveactivex.htm
I have not tried it myself but it seems to do almost what you need.
I think in future versions of Axapta we will be able to do catch Windows messages. The class SysSetupFormRun has the methods "messageProc" and "installMessageProc" which do not seem to be fully implemented yet.