An alternative and more efficient way is the use of a barcode gun, which is a plug and play device, that is, its installation is not necessary.
To carry out this action, it is necessary to carry out two actions in advance:
a) You must ensure that you assign a valid EAN13 or UPC barcode to the product.
b) To add a product through the barcode, just scan the barcode of the product with the reader and it will automatically appear in the product list. It is not necessary to place the cursor on the search bar.