Thanks for your question.
I'm not sure I understand exactly what it is that you are trying to do, but it sounds like you should either use LyShine to handle the inputs or the InputChannelEventListener but not a mixture of the two.
LyShine will consume mouse down events if you press the mouse while hovering over a button. Are you not seeing that happening?
Are you using C++, Lua or ScriptCanvas to write your interaction handling code?
The simplest thing, if you just want to get button clicks or press/release for buttons is to let LyShine handle it since that will do the work of knowing which button your are clicking on. You can either use action strings or notification buses such as UiButtonNotificationBus.
If, for some reason, you do not want LyShine to handle input you can disable that for a given UI canvas, either in the UI Editor canvas properties or via code/script.
Buttons are designed such that if you press down on a button but then move off the button and release then the click event is not sent. It looks like, in this case, it also doesn't send the released notification. Is this what is causing problems for you?
Thanks for the reply. Unfortunately my canvas contains simple buttons and more complex elements (images which i manipulate myself) and using only LyShine is not sufficient.
Yes, mouse down events happen on lyshine but are not consumed, while mouse up events are consumed.
I am using c++.
Would you suggest using a few canvases at a time then to avoid clashes between LyShine and
InputChannelEventListener or would that cause more problems?
Edit: it seems that after i disabled and enabled "Handle positional" option on my canvas, mouse down events started getting consumed as well.
Thank you @REDACTEDUSER
Using multiple canvases is supported and can be a good solution in certain situations. I'm not sure if it makes sense in this case.
When you say it started working after disable/re-enable do you mean you did that in the UI editor and resaved the UI canvas?
Adding new answers, comments, and votes is disabled.
Button not registering mouse upAccepted Answerasked 4 years ago
Amplify studio - setting onclick handler for button and select items dynamicallyasked 4 months ago
EKS Anywhere\Connector - Register New Cluster Button Does Not Reactasked 7 months ago
Input Bindings does not support mouse wheel up/down?Accepted Answerasked 4 years ago
How to add sound effects to UI?Accepted Answerasked 4 years ago
Mouse Back Button Does Not Work In AWS WorkspaceAccepted Answerasked 6 months ago
AWS IoT 1-Click is not updating wifi on new Seeed Buttonasked 6 months ago
Not able to see " Creare Aurora readreplica" button from RDS Postrgresasked 5 months ago
SiteWise 'Create User' button disappearedasked 7 months ago
In AWS Amplify UI React after Login how to redirect to dashboard path login button in home page in react in different pageasked 5 months ago