Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No response to button presses #3

Open
Aleksrayx opened this issue May 11, 2023 · 9 comments
Open

No response to button presses #3

Aleksrayx opened this issue May 11, 2023 · 9 comments

Comments

@Aleksrayx
Copy link

Aleksrayx commented May 11, 2023

Hallo, I have a problem with button clicks when the app Loupdeck is minimized. If the app Loupdeck on focus, Companion it reacts to pressing the buttons on, but when the app Loupdeck is not in focus or minimized, there is no reaction. However, if I click buttons in the Companion`s emulator, then there is always a reaction on Loupdeck device. What could be the problem?
Firmware version: 0.2.8
Software version: 5.6.2.16258
Companion version: 2.4.2

@Aleksrayx
Copy link
Author

Aleksrayx commented May 13, 2023

I am fixed it. You need to use "if (touchEvent.IsPress())" and "if (touchEvent.IsTouchUp())" in overrided function "ProcessTouchEvent" instead of "switch (touchEvent.EventType)".
Take this complied plugin if some one needed, just put in to the C:\Users\USERNAME\AppData\Local\Loupedeck\Plugins\ folder

@oddbear
Copy link
Owner

oddbear commented May 15, 2023

This is interesting, thanks for reporting... and doing some research.

I am not able to reproduce this, and it seems very strange.
Since this touches the Loupedeck plugin internals, and that code is obfuscated, I will ask the Loupedeck team what's going on.

I also see that you are using an older version of the plugin, since the latest does have override on RunCommand (this is needed to use actions in macros), and that was missing from your compiled plugin.

Do you have the same problem with the newest version?

@oddbear
Copy link
Owner

oddbear commented May 15, 2023

Could this be because of the EventType?

It seems like if I have a LongPress, the current code does not work as I would have expected.

@Aleksrayx
Copy link
Author

Aleksrayx commented May 15, 2023

I used the current version of the plugin, just commented out the RunCommand. From the Companion logs, I understood that when the application is not in focus, only the Release command comes, but Press is absent, this is only relevant for a dynamic folder. If we select a static button, we will receipve 1 Press and 2 Release requests and this work, but no feedback on button screen.
I can't understanded the dependencies of being in focus, I analyze the work of the plugin in debuger.

@Aleksrayx
Copy link
Author

Aleksrayx commented May 15, 2023

I am not able to reproduce this, and it seems very

May be because i am use razer stream controller. But, as far as I know it's the same.
If you need help testing the plugin on my device, I'm here to help.

@oddbear
Copy link
Owner

oddbear commented May 15, 2023

I was not testing it in folders. So now I where able to reproduce the issue. Nice.

A strange one this, and not sure if this is a Loupedeck issue or a plugin issue.
I will investigate to see what I find, but I will be traveling from tomorrow, so probably no release until after the weekend.

@Aleksrayx
Copy link
Author

Thanks, glad to hear this. I am grateful to your work above the plugin, it's really help me in my work. Now, after my correction it's all work like i need, but I will be waiting the upgrade.

@oddbear
Copy link
Owner

oddbear commented May 29, 2023

Hi, sorry it has taken some time...
(and now I need to validate the plugin against Companion 3.0 that's soon out)

It seems like IsPress, and IsTouchUp only reacts on Press and TouchUp (as expected).
IsLongPress will be triggered after a Press, but I don't think Companion has any LongPress support yet.

I also see that Press seems to always be triggered, but the TouchDown only get's triggered if the Loupedeck application is in focus (and sometimes multiple times)
That event seems so buggy, so the simple fix would be to just look for Press instead of TouchDown.

This is a strange one, as I cannot believe it has been like this in earlier versions of Loupedeck. But maybe it has...

I will install Companion 3.0 rc1 now, and validate... if that works, I can send this change in for validation.

@oddbear
Copy link
Owner

oddbear commented May 30, 2023

Added release if you want to test.
https://github.com/oddbear/Loupedeck.Companion.Plugin/releases/tag/v0.2.6

This is the one going to the store after some testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants