Assuming you are in FM11 or 12, you can use layout-based script
triggers. There is a trigger for OnLayoutKeystroke in the layout setup
dialog. Set this to call a script and set the script to just exit
without doing anything if a field is not active. Something like this:
If[ isempty(get(ActiveFieldName) ]
Exit Script[ 0 ]
Else
Exit Script[ 1 ]
EndIf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles