0

Can't control player with USB-Keyboard

I could use a little help😊

I'm trying to control the HifiBerry player with a connected USB-Keyboard. But  that only worked half somehow. No matter which key I pressed (crsr-up, crsr-down, crsr-left, crsr-right), it always just jumped to the next track (and very rarely also made a larger, unpredictable jump in volume). However, the buttons on the GUI (on the connected 7"display) worke perfectly: volume up, volume down, next, previous, play/pause.. everything fine.

I then looked at etc/audiocontrol.conf and saw that the section under [controller:ac2.plugins.control.keyboard.Keyboard] was currently empty. According to a few other threads here, that should have worked anyway, right?

That's why I connected an HDMI monitor and logged in as root and recorded the codes of the keys pressed with "showkey" to see what really arrived. For the sake of simplicity I also used the following keys (in addition to the crsr keys)...

 “a”, “b”, “c”, “d”, “e”

I got the following codes:

97, 98, 99, 100, 101 (ascii-dec = showkey -a) or

30, 48, 46,32, 18 (keycodes = showkey -k)

Afterwards I added - in line with other entries here in the forum (https://support.hifiberry.com/hc/en-us/community/posts/360014013977-Wireless-Remote-Control) - in the etc/audiocontrol.conf under [controller:ac2.plugins.control.keyboard.Keyboard] the following entries:

volume_up=97
volume_down=98
next=99
previous=100
playpause=101

Save, reboot, test -> Nothing happens. Now the player no longer responds to any input (Not even if I use keycodes instead of ascii codes.). :-(

And now I'm a little bit lost.

Maybe it's a problem with concurrent PowerController? At least one other user seems to have a similar problem (https://support.hifiberry.com/hc/en-us/community/posts/4406025171217-Keyboard-Plugin-not-working)

Here is some additional basic info:

Beocreate 4
Raspberry 3
7" display attached
Power controller attached
hifiberryOS 20230404
USB keyboard (I tried two different ones)

Any tips on how I can further analyze and implement this? Should I have adjusted the keyboard.py too?

P.S.: What I really want to do is to control the system with an old IR remote control. I want to connect the FLIRC USB stick, which acts as a kind of programmable keyboard. But before I buy it, I wanted to get it work with a normal keyboard first. But I can't get it to work. *seigh*

0 comments

Please sign in to leave a comment.