Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide Using a wireless USB Keypad as remote control
#1
A simple, effective, way to create a remote control for Moode is to repurpose a "wireless USB keypad".

[Image: attachment.php?aid=3354]


Parts list Instructions 
  1. insert USB dongle from keypad
  2. modify /etc/triggerhappy/triggers.d/media.conf  with the content below
  3. enable, and restart triggerhappy:

    systemctl enable triggerhappy
    systemctl restart triggerhappy

Code:
#/etc/triggerhappy/triggers.d/media.conf
KEY_KP0         0       mpc toggle
KEY_KPENTER     0       mpc next
KEY_KPPLUS      0       /var/www/vol.sh -up 5
KEY_KPMINUS     0       /var/www/vol.sh -dn 5

KEY_KP8         0       /var/www/vol.sh -up 5
KEY_KP6         0       mpc next
KEY_KP5         0       mpc pause
KEY_KP2         0       /var/www/vol.sh -dn 5
KEY_KP4         0       mpc prev
Reply
#2
Hi wga22,
Very interesting.
Best regards and thanks,
Francesco
Reply
#3
Yes! wireless number-pad...small but easier to lose down the back of the couch...:-)


https://my.christchurchcitylibraries.com...ahy-chair/
----------
bob
Reply
#4
(09-27-2023, 05:18 AM)DRONE7 Wrote: Yes! wireless number-pad...small but easier to lose down the back of the couch...:-)


https://my.christchurchcitylibraries.com...ahy-chair/

What fun. With my kids and grandkids it was all Hot Wheels cars (think jazzed-up Dinky Toys) and Lego bricks down the back of the chair. No room for fortunes.

Regards,
Kent
Reply
#5
Hello there,

i wanted to add that you can read out the keynames for your keyboard when you log in via ssh and type in the following command:

Code:
sudo thd --dump /dev/input/event0

This displays the keys that were recognized.
Exit the display via Ctrl-C.

The file /etc/triggerhappy/triggers.d/media.conf is built up as follows..


KEY_Name    Press-Action        Command

The Key_Name can be displayed via the command above,
the Press-Action is  0=release button  1= press button 2= press button long.
The command can be found in the setup-txt of MoOde. Actually, the info is in line 311 following.

Additionally, if you type in "mpc help" via ssh, this give's you the full set of possible commands.

Just a little more explanation to make it easier to follow.

Thanks for your great work!
Greets, Thomas
Reply
#6
(12-12-2023, 01:49 PM)muddiver Wrote: Hello there,

i wanted to add that you can read out the keynames for your keyboard when you log in via ssh and type in the following command:

Code:
sudo thd --dump /dev/input/event0

This displays the keys that were recognized.
Exit the display via Ctrg-C.

The file /etc/triggerhappy/triggers.d/media.conf is built up as follows..


KEY_Name    Press-Action        Command

The Key_Name can be displayed via the command above,
the Press-Action is  0=release button  1= press button 2= press button long.
The command can be found in the setup-txt of MoOde. Actually, the info is in line 311 following.

Additionally, if you type in "mpc help" via ssh, this give's you the full set of possible commands.

Just a little more explanation to make it easier to follow.

Thanks for your great work!
Greets, Thomas

Hi,

i get following error when using this command : 
sudo thd --dump /dev/input/event0
Error opening '/dev/input/event0': No such file or directory

Any ideas ? 


Thanks in advance
Reply
#7
(01-14-2024, 06:04 PM)krimikael Wrote: sudo thd --dump /dev/input/event0
Error opening '/dev/input/event0': No such file or directory
Hi,

what Pi model and what moOde version are you on?

maybe you can also post the result of the following:

ls -l /dev/input/
Reply
#8
(01-14-2024, 07:27 PM)Nutul Wrote:
(01-14-2024, 06:04 PM)krimikael Wrote: sudo thd --dump /dev/input/event0
Error opening '/dev/input/event0': No such file or directory
Hi,

what Pi model and what moOde version are you on?

maybe you can also post the result of the following:

ls -l /dev/input/

Pi-Zero W
Release 8.3.7

mk@FLY32:~ $ ls -l /dev/input/
total 0
crw-rw---- 1 root input 13, 63 Jan 14 20:00 mice

Triggerhappy isnt working with me, am i doing something wrong or missing something ?

Thanks for your advise
Reply
#9
Ok, i think i found the cause, mini keyboard is not recognized by the pi-zero.
Just attached another big size keyboard and everything works as it should.

Thanks Nutul
Reply
#10
(01-14-2024, 08:08 PM)krimikael Wrote: Ok, i think i found the cause, mini keyboard is not recognized by the pi-zero.
Just attached another big size keyboard and everything works as it should.

Thanks Nutul

Hi,

I suppose you are not so happy, but nevertheless...

can you try this:
lsusb

before and after having plugged the mini kbd, so we know if it is at least seen by the system.
Reply


Forum Jump: