# PasswordField only captures random subset of characters from a scanned barcode, when using a HID scanner (emulating a keystroke)

**URL:** <https://forum.inductiveautomation.com/t/passwordfield-only-captures-random-subset-of-characters-from-a-scanned-barcode-when-using-a-hid-scanner-emulating-a-keystroke/105660>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 29, 2025, 3:52am UTC](https://forum.inductiveautomation.com/t/passwordfield-only-captures-random-subset-of-characters-from-a-scanned-barcode-when-using-a-hid-scanner-emulating-a-keystroke/105660 "2025-04-29T03:52:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![apurva\_mishra](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@apurva\_mishra](https://forum.inductiveautomation.com/u/apurva_mishra)\
**Post date:** [April 29, 2025, 3:52am UTC](https://forum.inductiveautomation.com/t/passwordfield-only-captures-random-subset-of-characters-from-a-scanned-barcode-when-using-a-hid-scanner-emulating-a-keystroke/105660/1 "2025-04-29T03:52:22Z")

</div>

When we scan this barcode

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/e/3ed3a0d82690f46042f9e85024e37283ad01645b.png) using HID scanner from Datalogic  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/c/cc775550353c0777d5412476d416f96cfbc429bb.jpeg)  
it mimics a Keystroke.

But when a PasswordField is in focus, the scanned barcode inserted into the "text field" of the PasswordFiled component is random subset characters from the actual string. The String should be but what we get is:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/c/9c520792c67b33a0067e3084518ea1c95498304f.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/3/a3b36e259dad0b523b2dd617faf26b35724fbdc1.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/a/0acf5cf03d55b0f0e2a7581b8685de084c155b6a.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b614d9565bd3c3d55be0f3fd2e3b62a611b35aa5.png)

This doesn't happen when using a normal textfield and scanning a barcode using a HID scanner.

Please advice if this is a bug or a are we missing something ?
