Call xdotool ssh command from interface

Hello,

Because I have some challenges running youtube on my TV. I decided to setup a raspberry PI for just playing youtube.
I have still have to tweak stuff a little bit. but it works. But Still I need to have a keyboard attached which isn’t very nice.
I am able to send key imputs to this Rpi Using

xdotool key --window "$(xdotool search --class Chromium1 | head -1)" Down

in ssh.
but opening the terminal isn’t verry nice.

is there a way to open SSH to another pc and execute some commands?
If so I would be able to attach some buttons from a button card.

or is what I’m asking just strange?

You could use shell_commands to send commands to the remote Pi via ssh

thanks thats great,
this one does the trick

shell_command:
  youtube_down: "ssh -i /config/.ssh/id_rsa -o 'StrictHostKeyChecking=no' pi@<some internal ip>  'export DISPLAY=:0 && xdotool key --window \"$(xdotool search --class Chromium1 | head -1)\" Down'"