# Barcode scan event not being detected

**URL:** <https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 4, 2022, 1:39pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671 "2022-08-04T13:39:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_Deely](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Sean\_Deely](https://forum.inductiveautomation.com/u/Sean_Deely)\
**Post date:** [August 4, 2022, 1:39pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671/1 "2022-08-04T13:39:51Z")

</div>

I have a barcode scanner which can populate a text field when in focus however, instead of populating a text field, I would rather the scan trigger an event i.e., write to a tag. This scan event works as expected when using the perspective application on my mobile device but I need it to work with a USB scanner device. Does anyone know why it works on one device and not the other?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 4, 2022, 1:52pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671/2 "2022-08-04T13:52:41Z")

</div>

Because native barcode scanner functionality in the mobile app bypasses the keyboard, using mobile OS features. A USB scanner typically behaves just as a keyboard. (Some can be made to emulate a serial device instead, but Perspective has no way to handle that.)

---

<div class="post-metadata">

**Author:** ![Sean\_Deely](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Sean\_Deely](https://forum.inductiveautomation.com/u/Sean_Deely)\
**Post date:** [August 4, 2022, 1:57pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671/3 "2022-08-04T13:57:50Z")

</div>

So there’s no way to detect an event when using a USB scanner?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 4, 2022, 1:59pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671/4 "2022-08-04T13:59:23Z")

</div>

Just keystrokes.

---

<div class="post-metadata">

**Author:** ![Sean\_Deely](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Sean\_Deely](https://forum.inductiveautomation.com/u/Sean_Deely)\
**Post date:** [August 4, 2022, 2:02pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671/5 "2022-08-04T14:02:12Z")

</div>

Okay Thanks. Instead of detecting a scan event, is there a way (in perspective) to set the focus of a TextField component? If it helps, this would be the only Inut/TextField in the view.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 4, 2022, 2:07pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671/6 "2022-08-04T14:07:05Z")

</div>

Yup:

[https://forum.inductiveautomation.com/search?q=perspective%20textfield%20set%20focus](https://forum.inductiveautomation.com/search?q=perspective%20textfield%20set%20focus)

---

<div class="post-metadata">

**Author:** ![Sean\_Deely](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Sean\_Deely](https://forum.inductiveautomation.com/u/Sean_Deely)\
**Post date:** [August 4, 2022, 2:13pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671/7 "2022-08-04T14:13:27Z")

</div>

Thank you. Do you know if functionality for detecting scan events using a USB will be added in the future or will the scanning always have to be done using the mobile application?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 4, 2022, 2:19pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671/8 "2022-08-04T14:19:09Z")

</div>

I would expect supporting USB scanners in serial mode to be difficult but not impossible. Maybe only in Perspective Workstation, not Mobile. (Not at all in a browser.)

{ This is one of the things Vision Clients can do for which there’s no path to Perspective. }

---

<div class="post-metadata">

**Author:** ![Sean\_Deely](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Sean\_Deely](https://forum.inductiveautomation.com/u/Sean_Deely)\
**Post date:** [August 4, 2022, 2:27pm UTC](https://forum.inductiveautomation.com/t/barcode-scan-event-not-being-detected/62671/9 "2022-08-04T14:27:22Z")

</div>

Thanks again.

Instead of detecting a scan, I am now setting the focus of a TextField and then adding a text property change script on the TextField which will then write to a tag. Having an event trigger on a scan would simplify this process a lot.
