Stop input events, use custom ones, then restore the original? #5232
Replies: 1 comment
-
Posted at 2022-09-30 by @gfwilliams
Well, if apps use So potentially you could find those, remove them and re-add them after... But there is no way of flagging that an event is handled and shouldn't be propagated at the moment. If there's a sensible way to do this I could maybe include this in the firmware though Posted at 2022-09-30 by @halemmerich In my sensortools I override the .on and .removeListener methods, but that is only for debugging purposes. I suspect too much overhead to do that in possibly multiple libs. Posted at 2022-10-03 by @gfwilliams You can get/set all the handlers pretty easily with Posted at 2022-10-03 by rigrig This seems to work (in the emulator at least):
Posted at 2022-10-04 by Sir_Indy Fab, thanks @rigrig! Looks good, I'll give it a go. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-09-29 by Sir_Indy
Hello awesome Banglers!
I have a couple of projects on the go, Hiding the widget bar in an overlay, and Pop up notifications in an overlay, both using
Bangle.SetLCDOverlay
. I'm having trouble with swipes and drags. I can set a new event handler to move the overlay, but the clock face or app underneath also reacts to the swipe or drag.Is there a way to block or clear existing events, e.g.
Bangle.on('swipe'...)
, use my customswipe
handler, then clear my custom handler and put the previous one back?Beta Was this translation helpful? Give feedback.
All reactions