Key Statement or .KeyDown

I remember from years ago a .KeyDown and .DialogKeyDown procedure that would intercept the keys as pressed and have the procedure control the output. I want to have the Return Key close a form as it ends data editing or have it add a new record when pressed in the Pan X View as List form.

You should be able to do that with a hotkey.