magic_mapper
magic_mapper copied to clipboard
Add support for 'list' of actions to be performed for a single keypress.
- 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 thanks for this! I'll just do some light testing to ensure existing functionality isn't affected and then I'll merge this.
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"
}
}
]
Hi,
Did you get a chance to review this?
Apologies haven’t had a chance to look at this but I will this week/weekend and merge this. Thanks!