companion
companion copied to clipboard
Support swipes from Streamdeck plus
Is this a feature relevant to companion itself, and not a module?
- [X] I believe this to be a feature for companion, not a module
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the feature
using the Elgato software you can swipe between pages using the touch screen, Currently, there is no Touch screen support that i am aware of. I understand this takes a lot of work and there are a lot of variables in using a touch screen like this. so i am patient.
Usecases
I just want to be able to swipe between pages, using a finger.
I think this needs some thought on what is wanted, and how to achieve that.
This is asking for swiping to change pages. How configurable does this need to be? Is it enough to loop through every page, or should it be able to define a loop of pages 1-5, and another for 10-20?
Someone else has asked for swipes to be able to trigger the rotary actions.
+1 for this idea... I'd love to see a swipe left / swipe right be an action like any other (press / release / rotate right & left)... thus allowing all sorts of possibilities.
+1
Short swipes from the current buttons could be rotary left/right actions. Another idea is to add Page actions, swipe left/right/up/down (for other surfaces). -> Page Up/Down could happen here without affecting any buttons.
just to clarify Companion does support "touches" as button presses, but I decided that Companion didn't suit my current use case, but I still love the software, (I also use Companion on other computers. just not my home pc with the streamdeck+ )
Short swipes from the current buttons could be rotary left/right actions.
I think this is the way to go, but is it desirable to have 4 different swipe actions depending on where you start from (I am 90% sure this is possible)? Or would it be better to treat it as a single swipe zone and trigger the actions from all 4 buttons? or make this behaviour configurable in the surface settings?
Short swipes from the current buttons could be rotary left/right actions.
I think this is the way to go, but is it desirable to have 4 different swipe actions depending on where you start from (I am 90% sure this is possible)? Or would it be better to treat it as a single swipe zone and trigger the actions from all 4 buttons? or make this behaviour configurable in the surface settings?
I think it would be best for now to treat it as a single "zone" and develop simple actions and fix bugs relating to touch inputs. and then work on / trail 4 touch buttons.
Short swipes from the current buttons could be rotary left/right actions.
I think this is the way to go, but is it desirable to have 4 different swipe actions depending on where you start from (I am 90% sure this is possible)? Or would it be better to treat it as a single swipe zone and trigger the actions from all 4 buttons? or make this behaviour configurable in the surface settings?
I believe that a device setting would be better, since it could give us more flexibility between presses and swipes for those buttons, even if they just default to page +/- as a setting it would free up 2 buttons for us.
I was trying to do a pseudo-swipe with something like adding a variable or something on button press for the strip to figure out the direction I was swiping but I didn't have any luck getting it to fire.
Let me know if I can help testing I'm running on Ubuntu 22 with a Plus and Companion 3.2.0 beta. I also code in node so if you need me to I can figure out the stack and help but it would be my first contribution to this project so I would rather someone with more experience on that end. I have used companion across Mac/Windows and Linux, including RPis and have created some comprehensive custom UIs for it to work mostly with ATEM devices and multiple computers running OBS and custom node scripts.
Thank you for such and amazing software 🫡
Ok I took a moment to figure out the two main files I think we would need to reference for this, please let me know if I am missing something. Perhaps the UI side for the Device config.
File that seems to have the implementation for the Plus. I also noticed you guys are reducing both long and short presses into a LcdPress, which is probably why I couldn't do the pseudo swipe.
https://github.com/bitfocus/companion/blob/master/lib/Surface/USB/ElgatoStreamDeck.js
Example for the plus swipes on the lib companion seem to be using in package.json
https://github.com/Julusian/node-elgato-stream-deck/blob/main/packages/node/examples/streamdeck-plus.js#L61
streamDeck.on('lcdSwipe', (index, index2, pos, pos2) => {
console.log('lcd swipe #%d->#%d (%d, %d)->(%d, %d)', index, index2, pos.x, pos.y, pos2.x, pos2.y)
})
If anything I might create a dirty node service that does page changes for me using the HTTP API if this feature takes too long, if I do so, I will provide the code here for anyone that wants it 🤲🏽
I also noticed you guys are reducing both long and short presses into a LcdPress, which is probably why I couldn't do the pseudo swipe.
This is because this streamdeck doesn't do good events for the touch strip.
If you press and release within 1s, then it emits a 'short press'. If you press and hold for longer than 1s, it emits a 'long press' (I dont remember if this is after a fixed duration, or when you release it). And this is what the hardware sends back over usb, we don't get any more detail than that. So to handle both cases sanely in companion's view of how buttons work, we treat them both as simple presses.
Maybe we could split short and long, but I don't know how that should translate into the long presses we support elsewhere. It would still be a frustrating simplification.
Doing an implementation of the swipes would be pretty easy, adding the option to choose the behaviour becomes a bit harder. And I still wonder exactly how that should work (if a single zone, should it trigger the rotation for all 4 or just one of the 'buttons' and which one should it be) the bigger challenge is figuring out how to make this work the same when the streamdeck is connected via satellite