# Badge Authentication

**URL:** <https://forum.inductiveautomation.com/t/badge-authentication/88938>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 16, 2024, 7:36pm UTC](https://forum.inductiveautomation.com/t/badge-authentication/88938 "2024-04-16T19:36:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Garcher1](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Robert\_Garcher1](https://forum.inductiveautomation.com/u/Robert_Garcher1)\
**Post date:** [April 16, 2024, 7:36pm UTC](https://forum.inductiveautomation.com/t/badge-authentication/88938/1 "2024-04-16T19:36:01Z")

</div>

I'm trying out a bluetooth badge reader made by serialio. It acts as a keyboard wedge and uses, on ios, a third party keyboard called SerialMagicKeys. I'm using dual mode authentication. If I were to login with my username and password, swipe the badge while I have focus on the username input, the data comes into the field just fine. How do I get perspective to listen to the input when its on the scan your badge screen? Do I need to do some type of keystroke event? Any help is appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [April 16, 2024, 8:01pm UTC](https://forum.inductiveautomation.com/t/badge-authentication/88938/2 "2024-04-16T20:01:05Z")

</div>

A keyboard wedge simulates a keyboard so it will only send input to the active component.

Typically I will set up a textbox on a screen that gets focus before the user scans something. Then I will have an event that watches for an end char on the scanned code which would be sent at the end of a scan. When the script sees that code it knows that the code is fully sent so it triggers execution of the script to process the scanned information.

I haven't used the bluetooth session event yet but you may want to see what information comes into that when you're scanning badges. There might be a real clean way to handle this on the gateway scope with a session event script.

> **[Perspective Session Event Scripts | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/scripting-in-perspective/perspective-session-events-scripts#bluetooth)**
>
> Perspective offers a collection of Session Events designed to allow the Gateway to track and interact with the Session at critical moments. Specifically, they are scripts that run in the Gateway when a Session starts up, shuts down, or runs a...
