magic_mapper icon indicating copy to clipboard operation
magic_mapper copied to clipboard

Add support for 'list' of actions to be performed for a single keypress.

Open anishsane opened this issue 9 months ago • 4 comments

  • Added support for 'list' of actions to be performed for a single keypress.
  • Also, the invocation of the function can be limited based on the foreground app.
  • Also added support for wheel scroll, since it was interfering with the button 7 remap.

anishsane avatar Apr 05 '25 09:04 anishsane

@anishsane thanks for this! I'll just do some light testing to ensure existing functionality isn't affected and then I'll merge this.

andrewfraley avatar Apr 07 '25 21:04 andrewfraley

A sample usage for the list approach:

I use kodi for watching TV channels. It is hosted on a raspberry-pi connected to HDMI 2. With the guide button, it switches to HDMI 2 and opens TV guide page in kodi with curl.

  "guide": [
	{
		"function": "launch_app",
		"inputs": {
			"app_id": "com.webos.app.hdmi2"
		}
	},
	{
		"function": "curl",
		"inputs": {
			"url": "http://kodi:[email protected]:8080/jsonrpc",
			"method": "POST",
			"data": "{\"jsonrpc\": \"2.0\", \"method\": \"GUI.ActivateWindow\",\"params\":{\"window\":\"tvguide\"}, \"id\": 1}",
			"headers": "content-type: application/json"
		}
	}
  ]

anishsane avatar Apr 08 '25 14:04 anishsane

Hi,

Did you get a chance to review this?

anishsane avatar May 13 '25 05:05 anishsane

Apologies haven’t had a chance to look at this but I will this week/weekend and merge this. Thanks!

andrewfraley avatar May 24 '25 20:05 andrewfraley