-
-
Notifications
You must be signed in to change notification settings - Fork 193
Long-press haptics #2025
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
base: main
Are you sure you want to change the base?
Long-press haptics #2025
Conversation
…rength of gesture movements
|
Just noticed the discussion in #1867. I figure with the reduced strength it's okay to remove that 100ms haptic cooldown, so I've gone ahead and done that. I also fear that could interfere with the long-press vibration of a user who's using the 100ms long-press timeout. Now that I know that was there, I noticed I really don't like how it would skip vibrations when typing super quickly 😅 If you want me to, I can add it back and have it only apply to gesture-move haptic events. A cooldown of 20ms or 50ms is possible, too. I really like consistently being able to feel each and every cursor nudge when I'm trying to be precise with the space swipe. |
|
Also caught a bug with custom vibration duration! Custom duration will apply to key-presses and the long-press vibration. It will not apply to gesture movement. LOL. Maybe this should be fine-tuned with a duration multiplier. 🤷 |
|
@CloisteredCaiman I'll mention you as well since you seemed rather excited about #1867's changes. Gesture vibration is still here, it is using a weaker vibration strength and no longer has a cooldown currently. |
Questions:
Sounds good to me.
Looks like these are the only exceptions. |
|
It is a second vibration, slightly stronger than the first. I'm not changing short press vibration behavior at this time. I like how it is on the main keyboard, but I can see vibrate-on-touch being an annoyance when scrolling through a long toolbar. |
|
Thanks and welcome back! When testing everything works fine, except for move gestures. Here it seems both Looking through, I noticed I'm not quite happy about the different ways of calling audio & haptic feedback. (note that some of this was already there previously and I didn't actively notice)
I don't remember changing it, and for me it's clearly longer than a "normal" long press. I think it's using some system default as opposed to the configurable duration of other key presses. |
You could allow it for |
| } | ||
|
|
||
| private fun gestureMoveForwardHaptics() { | ||
| if (!connection.noTextAfterCursor()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this check can be rather slow, as it doesn't use cached data. On my phone it's usually fine, but in some wasteful apps (e.g. Logseq) it usually takes around 10 ms, and 30-100 ms when there is a lot of text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seriously, how can you mess up an input field so badly? or firefox is another example. what ungodly hacks are they doing to their EditTexts that causes the input connection to be janky and broken? the default EditText is clean and perfect with things like this. i don't get it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the impression this in most cases there is JavaScript involved in some way, e.g. Logseq essentially is JS in a WebView.
|
I'm reticent to make any further structural changes in this PR since it's already a rather significant refactor of haptic handling. Is there anything you'd like me to change before merging? It looks like future action items are:
|
No (also commented on that in #1035). Also tried on my other phone, here |
For Android 9 (I guess 10 of the other phone is the same), both
That's probably too much, unless you (or other users) actually want it. |
That's definitely for later, and not really necessary at all.
This is something that should be addressed. Ideas:
|
I don't lol. |
|
My suggestion for horizonal cursor move
On the cursor move vibration availability:
Btw what are your plans with the other (commented) |
We are so back.
This branch closes #1859 by adding long-press haptics to the keyboard.
EDIT: this branch also closes #2021, provided we keep the removal of the haptic cooldown. I came back at a really good time! What a wild coincidence.
Behavior changes:
Technical notes:
p.s.: didn't we want longer long-press duration for the spacebar -> language menu gesture? did that change at some point? it seems to just have the regular duration. i'd prefer 1.5x personally.