INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Translating media keys to network/html commands  (Read 730 times)

LilyAarseth

  • World Citizen
  • ***
  • Posts: 156
Translating media keys to network/html commands
« on: October 15, 2021, 03:57:04 pm »

I also have an idea that i'm thinking would be pretty nice.

Since MC already has a lot of advanced network features, would translating media keys into html calls or what it's called be doable? For example my preamp has network control with html and I am running a lua script a friend made for me with hammerspoon that translates some F buttons into network commands that controls my amplifer. What I would love to be able to is to mute and control volume up/down on my amplifier with translated media buttons on my keyboard. Since MC gets exclusive access to media keys when it is running this would likely work without a hassle since I have volume disabled so volume up/down and mute buttons doesn't do anything right now when MC is running.

As an example, this code mutes and unmutes the amplifier over the network with F3 on my keyboard:

hs.hotkey.bind({}, "F3", function()
  hs.http.asyncGet("http://M12.local:11000/mute", nil, function()
  end)
end)

Is it possible to do something like this? I'm willing to pay a day's wage for this.
Logged
Pages: [1]   Go Up