# Client Keystroke Scripts

**URL:** <https://forum.inductiveautomation.com/t/client-keystroke-scripts/21612>\
**Category:** Ignition\
**Created:** [December 28, 2018, 2:41pm UTC](https://forum.inductiveautomation.com/t/client-keystroke-scripts/21612 "2018-12-28T14:41:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordan.rajchel](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jordan.rajchel](https://forum.inductiveautomation.com/u/jordan.rajchel)\
**Post date:** [December 28, 2018, 2:41pm UTC](https://forum.inductiveautomation.com/t/client-keystroke-scripts/21612/1 "2018-12-28T14:41:16Z")

</div>

I am attempting to recognize a barcode scan on my app regardless of where I am on the app or what component has focus.

The best way I can see to do this is through the Client Keystroke Scripts. I have programmed a Prefix of ‘~’ onto my scanner and a Suffix of ‘ENTER’.

I want to use the KeyStroke script for “ALL\_CANDIDATES” but it does not seem to be triggering correctly. Any ideas?

---

<div class="post-metadata">

**Author:** ![ghuck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ghuck/32/8337_2.png) [@ghuck](https://forum.inductiveautomation.com/u/ghuck)\
**Post date:** [December 29, 2018, 6:01pm UTC](https://forum.inductiveautomation.com/t/client-keystroke-scripts/21612/2 "2018-12-29T18:01:37Z")

</div>

You do not say how the Bar code scanner your using is connected to your computer, but the best way to do something like this is if your scanner is a USB type bar code scanner, is just to purchase the barcode scanner module from Sepasoft available for the same trail periods right from the Ignition download web page. Then just put the scanner widget on your form.  
I would think trying to do this using the keystroke capture method would be fought with a lot of problems, although theoretically doable if you have both a good start character (Your using a tilde) and end character. And there are no other keystrokes coming from anything other place while there using the scanner. The Sepasoft is a very clean way of doing this. If you scanner is a serial type, then I would try the Ignition client serial module, rather then the Sepasoft one.

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [January 2, 2019, 8:38am UTC](https://forum.inductiveautomation.com/t/client-keystroke-scripts/21612/3 "2019-01-02T08:38:53Z")

</div>

A technique we use for RFID tag readers that also work by sending keystrokes over USB, is to have an invisible text field on a page that’s always opened (like a navigation bar). You can make it visible for debugging.

Using the keystroke, we focus on that text field, and by setting the “ENTER” as suffix, it causes a value update on the text field.

Note: using a plain key like “~” probably isn’t such a good idea. People may want to type that, and wonder why it’s not doing anything. Using a function key (F1-F12) is better. Or working with weird modifier keys may also work.

---

<div class="post-metadata">

**Author:** ![jordan.rajchel](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jordan.rajchel](https://forum.inductiveautomation.com/u/jordan.rajchel)\
**Post date:** [January 2, 2019, 12:59pm UTC](https://forum.inductiveautomation.com/t/client-keystroke-scripts/21612/4 "2019-01-02T12:59:49Z")

</div>

Thank you all! We decided to go with the Sepasoft module.
