Replies: 1 comment
-
There have been a handful of previous questions about supporting simultaneous buttons, see for example: The library does not support multiple buttons directly. My inclination so far has been to push the responsibility for handling multiple buttons into the EventHandler or IEventHandler provided by the developer of the application code. My rationale is that:
In your particular example, you will need to think about and design the specification of exactly how you want your button combinations to behave:
As you can see, everything depends on what you want your app and your buttons to do. I don't think I have the capacity to design a configuration mechanism that can support everything that anyone would ever want to happen with the combination of 2 buttons. So take a look in #83 for the look at my examples/SimultaneousButtons. You will want to create your own subclass of I have limited time to spend on this library, so I hope you can do most of the heavy lifting yourself with the hints that I have given above. Good luck! |
Beta Was this translation helpful? Give feedback.
-
Hi, congratulations on a very nice project.
What I want to ask is, is it possible to have a feature that I think would be very nice if added?
I need to use the long-press method of two keys to turn a device off and on safely.
I am able to check and catch the isPressedRaw() property on both keys in the kEventLongPressed event. But the event throwing occurs on the second depressed key.
I wonder if it's possible to do two-key presses with the existing library?
code;
terminal;
Beta Was this translation helpful? Give feedback.
All reactions