# Rpi-keyboard node - observations

**URL:** <https://discourse.nodered.org/t/rpi-keyboard-node-observations/40358>\
**Category:** General\
**Created:** [4 February 2021 08:30 UTC](https://discourse.nodered.org/t/rpi-keyboard-node-observations/40358 "2021-02-04T08:30:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 February 2021 08:30 UTC](https://discourse.nodered.org/t/rpi-keyboard-node-observations/40358/1 "2021-02-04T08:30:55Z")

</div>

A while back I was asking how to detect key presses on a keyboard and was pointed to the `node-red-node-pi-gpio` set of nodes with a keyboard node.

Ok, done.

(This is a side-project and so wasn't receiving correct priority and thus it has taken some time for me to post this.)

I have a couple of keyboards I use mainly. This one on my main machine and one of those rubber "roll up" keyboards.

Both work in so far they allow me to write programs and make mistakes on the machine into which they are plugged.

So, I installed the set of nodes and a few weeks passed until I again _needed_ that functionality.

It didn't work. ☹

On the machine the node shows green and all is ok. So what is wrong?  
(Beats me)

Today I remembered and so powered up that machine and got **another** keyboard and plugged it in.

Now it works with **that** (new/other/never before tried) keyboard.

## WEIRD!

I then unplugged this keyboard and plugged it into the Pie. (Two keyboards) (Wow!)

One, works. Other doesn't. (And the third one also doesn't)

All USB keyboards.

The one which works is a `Jite` brand. (Shrug)  
This one (the _main_ one I use for most of my stuff) is a `Logitech` one. (K120)  
and the _rubber_ one.. No-name/brand generic.

Is this to be expected?

Oh, that machine's specs:  
RasPi 3B Stretch.  
NR 1.2.7  
rpi-keyboard 1.2.3 (rpi-gpio)

Anyone?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [4 February 2021 08:51 UTC](https://discourse.nodered.org/t/rpi-keyboard-node-observations/40358/2 "2021-02-04T08:51:12Z")

</div>

the node only works with one keyboard - usually the first one it detects. Do you have all three plugged in at once ?  
can you show us what `ls /dev/input/by-path/ | grep -m 1 'kbd'`reports ?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 February 2021 08:58 UTC](https://discourse.nodered.org/t/rpi-keyboard-node-observations/40358/3 "2021-02-04T08:58:17Z")

</div>

I'll try to get that for you soon.

To clarify:

_rubber_ keyboard plugged in and the node shows a `green` dot under it.  
"All good" - I'm guessing. I even think it says `OK`.

`debug` node connected, `deployed` but nothing when keys pressed.

Hmmm.. 🤔

Brought the machine back and used **this** keyboard instead. _rubber_ keyboard not connected.

Same. 🤔😒

Moved to low priority.

Today I remembered and powered up the machine.

Plugged in entirely new keyboard. Pressed keys. It works!

I plugged this one back in - ok, with other one still in - no result.

But anyway, that's (I hope) a better explanation of what happens.

## Oh:

If I swap keyboards, what do I have to do to get the new one to be accepted?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 February 2021 09:12 UTC](https://discourse.nodered.org/t/rpi-keyboard-node-observations/40358/4 "2021-02-04T09:12:44Z")

</div>

Right, with the working keyboard, this is what I see:

```auto
pi@BeefPi:~ $ ls /dev/input/by-path/ | grep -m 1 'kbd'
platform-3f980000.usb-usb-0:1.3:1.0-event-kbd
pi@BeefPi:~ $ 

```

Pressing keys nothing happens.

Shall reboot the machine and plug in this keyboard first and get back to you.

ARGH!

Ok, now it is working.

I won't be able to test it with the _rubber_ keyboard for a few weeks. (It is in a remote location, and I'm not)

---

<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:** [5 April 2021 09:13 UTC](https://discourse.nodered.org/t/rpi-keyboard-node-observations/40358/5 "2021-04-05T09:13:22Z")

</div>

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