# Keyboard Input in nodered

**URL:** <https://discourse.nodered.org/t/keyboard-input-in-nodered/44209>\
**Category:** General\
**Created:** [15 April 2021 04:23 UTC](https://discourse.nodered.org/t/keyboard-input-in-nodered/44209 "2021-04-15T04:23:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [15 April 2021 04:23 UTC](https://discourse.nodered.org/t/keyboard-input-in-nodered/44209/1 "2021-04-15T04:23:29Z")

</div>

Hi I have a raspberry PI with 2 barcode scanners attached to it. As we all know, barcode scanners just emulates the Keyboard signal. I want to know whether the input signal is coming from barcode #1 or barcode #2 in node-red. Is it possible to have them like a "Device ID" or any identification for me to identify whether barcode 1 or barcode 2 sends the input signal?

Thank you.

With kind regards,  
Henjoe

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 April 2021 09:48 UTC](https://discourse.nodered.org/t/keyboard-input-in-nodered/44209/2 "2021-04-15T09:48:14Z")

</div>

How are the scanners attached to the pi?  
What node are you using to read them?  
Is the same node reading them both? If not why not add a change node after the reader to add the name of the device to the msg object?

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [15 April 2021 10:19 UTC](https://discourse.nodered.org/t/keyboard-input-in-nodered/44209/3 "2021-04-15T10:19:55Z")

</div>

You don't say what node you are using to read the HID data from the scanner.  
Maybe a node like [node-red-contrib-usbhid](https://flows.nodered.org/node/node-red-contrib-usbhid) has some more option to read the serial or device-id.  
Most of these scanners can be programmed, as last solution you can add an extra different prefix to the scanner and filter that prefix if the data is coming in.

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [15 April 2021 10:51 UTC](https://discourse.nodered.org/t/keyboard-input-in-nodered/44209/4 "2021-04-15T10:51:51Z")

</div>

Hi zenofmud,

Thanks for your input. The barcode scanner is actually attached via a USB port.

To be honest, I don't know yet what node/flows should I use to get the barcode scanned input.  
Hope you can suggest one.

Again, thank you for your information.

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [15 April 2021 10:52 UTC](https://discourse.nodered.org/t/keyboard-input-in-nodered/44209/5 "2021-04-15T10:52:57Z")

</div>

Thanks for your suggestion. I actually don't know what node should I use, your suggestion is highly appreciated and I will look on this.

With kind regards

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 April 2021 12:21 UTC](https://discourse.nodered.org/t/keyboard-input-in-nodered/44209/6 "2021-04-15T12:21:43Z")

</div>

> [@Henjoe](#):
>
> I don't know yet what node/flows should I use to get the barcode scanned input.

Have you looked in the [Flows](https://flows.nodered.org) tab here on the forum? Have you searched the forum for barcode to see what comes up?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 June 2021 12:21 UTC](https://discourse.nodered.org/t/keyboard-input-in-nodered/44209/7 "2021-06-14T12:21:48Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
