touchscreen press&hold #5746
Replies: 1 comment
-
Posted at 2023-02-23 by rigrigrig
It seems to be undocumented, but exactly what you're looking for: Edit: Only tested it on my Bangle.js 2, so it might not work on the Bangle.js 1. Also doesn't seem to work in the emulator. Posted at 2023-02-24 by dapgo Are you sure? Posted at 2023-02-24 by @gfwilliams The 'type' is from the Bangle.js 2 touchscreen controller, but I'm afraid it's not in the emulator, and won't be on Bangle.js 1. I guess if you want to do that you need to compare the time differences between the press+release events Posted at 2023-02-24 by dapgo
Do you know about code/apps already controlling time between press+release events? Posted at 2023-02-24 by @gfwilliams I think the Posted at 2023-02-24 by @allObjects In a UI context, the long press vs short kick usually initiates an alternate function or a menu to select from a host of alternate functions. It became necessity when - because of Apple (2) - lost the second eye to end up as a single eyed minion. Initially, the mouse started out with 3... Next issue with touch vs mouse is the loss of continuous 'contact' of the pointing device indicator - and with that the mouse pointer had to go away. Luckily touch w/ move - drag - is introduced. Back to the long press: this could actually really increase robustness of changing settings. I experience the setting of, for example, elements of time very finicky... may be I do it wrong, but a long press on the item with a pop up that has plenty real estate to have easy usable up/down, cancel/ok controls. Sometimes the direct control is not worth the trouble it creates, or in other words, and extra touch at the begin and end of an operation is worth to pay to have a robust working operation. This is especially true in the fight of a fat finger on a super tiny and moving touch screen. Posted at 2023-02-24 by dapgo
Cool and first notice of it. Time ago I tried to create a UI template to implement some of these features
I want to associate the long press to a delete file operation, so a simple event is not an alternative. Posted at 2023-02-27 by dapgo The layout library is powerful but it is not a solution to have a long press touch event on (bangle.js2) Executing below code you can see that "long press" is only detected on Bangle.js1
Is it is the expected behaviour? I am aware of @enaon using "longpress" on his eucwatch and I see that it is through digitalPulse? Posted at 2023-02-27 by @gfwilliams
It works fine for me... Long-pressing on "file" gives But as I said it doesn't work in the Bangle.js 2 emulator Posted at 2023-02-27 by dapgo
It has sense that low level code is common and applies also to layout. ;) On the other hand, I was trying to use at sametime "Layout" (for physical and on screen buttons) and "setUI" (for "back" icon+call, swipe and touch events) But I've realized that "layout.render()" removes the SetUI settings. Whereas "setUI()" removes the code associated to "layout btns" am i doing something wrong ? Posted at 2023-02-28 by @gfwilliams
Yes, it is - potentially we could change that though - maybe allowing a |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-02-23 by dapgo
I've been trying to get additional interactions compatible with bangle.js1, and i got success long press for buttons.
However I can't find info about how to use Bangle.on('touch' and time periods.
In the documentation there is:
Besides "zone" and "e"(x,y) there is also "e.type" but i don't know what is its purpose.
Any idea to apply time events for touch tap?
Is the only possible solution at a lower level, such as digitalPulse(pin, value, time)?
Beta Was this translation helpful? Give feedback.
All reactions