Handle KeyPress event (F5) on form

Hi everyone,

On dynamics AX 2009, I’d like to override the F5 keypress on a form.

In my form, I have a grid, and when the user press the F5 key, the record on the grid which gets the focus is the first one and I need it to be the last one.

How can I override the F5 keypress on my form?

Thank you in advance,

Set the Form/datasource/table’s StartPossition property as “Last”