Keyboard Hotkey Linux and Windows

I would like to use keyboard hotkeys to launch HA scripts.
The hotkeys will be pressed from three different machines:

  • A linux machine running Ubuntu
  • A Windows 10 laptop
  • A Windows 10 PC.

Anyone know if this is possible?

Do you mean system-wide shortcuts?

If so, besides the OS-specific way to actually trigger a command, you can use REST API | Home Assistant Developer Docs to interact with HA.

Thanks Chris, I’ve had a quick look at your suggestion, maybe that will work for me. I’d need to read more into it.

Not sure by what you mean by system-wide shortcuts.

My use-case is complicated. I have a HDMI switcher which is IR based. I want to send three different IR codes to switch HDMI inputs for each of my computers connected to the HDMI switcher. I’m using a Broadlink IR transmitter in HA for this.

So, I want to use three keyboard hotkeys on each computer to activate three separate automations within HA.

I am sharing the keyboard via the synergy KVM software application.

Not sure if you have resolved in meantime but I think webbooks in combination with CURL is exactly what you need.

Here info about webhooks with CURL example:
Automation Trigger - Home Assistant (home-assistant.io)

CURL for windows (if you do not have): curl for Windows
Then to link command to windows shortcut: Open programs with keyboard shortcuts in Windows 10 - CNET
On Ubuntu link the CURL like the following: Four Ways to get Instant Access to a Terminal in Linux (howtogeek.com)

1 Like

All mentioned above is right. On Windows though to create GET and POST requests you can use some batch magic that doesn’t require any extra binaries to be installed: winhttpjs.bat. The usage is nicely presented in this reply on stackoverflow: httpwebrequest - http web request from batch file - Stack Overflow