It might require scanner support. Some USB-interfaced barcode readers have "function key mode" option. When this option is enabled, the barcode reader output bar code values 01 ~ 1f as function keys. ASCII value 10 is translated into Enter key. Code128 supports encoding ASCII value 10. Produce barcode on string "1234~d0101234" will produce key sequence "1234" ENTER "1234". For serial port interface barcode scanner, search "scanner wedge program" on the Internet. Those programs translate values received from serial port into keys on the keyboard.