--- title: "How to use a Text Input component to read a Barcode value" slug: "how-to-use-a-text-input-component-to-read-a-barcode-value" updated: 2023-01-30T06:21:10Z published: 2023-01-30T06:21:10Z canonical: "help.pillir.io/how-to-use-a-text-input-component-to-read-a-barcode-value" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # How to use a Text Input component to read a Barcode value? A barcode scanner component does not recognize an IR gun. So a **text input** component can be added to the page to enable users to scan or manually enter barcode values. To ensure that the barcode is complete and not broken, the **keyCode** variable is used in get variable field. **keyCode Logic**: - If the user adds the barcode with an IR gun, the item ≠ 0 if loop is triggered. - If the user manually enters the barcode value and clicks enter, the item = 13(enter) loop is triggered and the barcode value is stored. ![GetKeyCode](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/GetKeyCode.png)