The Mac is trying to figure out what keyboard you have. By instructing you to hit a certain key, it's trying to find out the keyboard layout and thus the overall type of keyboard. The barcode scanner sends keycodes-the data generated by pressing a key-so the Mac thinks it's a keyboard.
Check the manufacturer's web site for a Mac driver. Such a driver should both include instructions on how to set up the scanner with a Mac and the data to tell the Mac just what "keyboard" it's connected to.