I configured our scanners to put Shift-capslock-~ at the begining of all scanned text. I then set up an OnLayoutKeystroke script trigger that checks for this key combination and if detected, puts the cursor in the correct field to receive the rest of the scanned data.
Interesting - so you are saying that when someone does scan a bar code and the cursor is NOT in a field - that
the layout somehow 'hears' this from 'OnLayoutKeystroke' as a script trigger that in turn goes to the filed and enters the scan data (sans the shft-capslock)
If you have FIleMaker 10 or 11, and if you can configure your scanner to precede the scanned data with a specific keystroke or comibination of keystrokes, (Most scanners have this capability) then this trigger performs with each keystroke (manually or from the scanner) and checks for this key combination. When detected it puts the cursor in the correct field and then uses Exit Script [false] to cancel out (ignore) the actual keystroke "event".
With a magnetic strip scanner that we use here, I've set up the scanner and script to use Shift-Caps lock-~ as the triggering key combination. My script uses Get ( TriggerModifierKeys ) and Get ( TriggerKeystroke ) to test for these keys.
If interested, you might download a trial copy of FileMaker 11 and see how this works.
(Scanners typically run in "keyboard emulation mode" and are thus input from the scanner is perceived by the computer's currently active software as though a typist just typed in the data manually.)