-
Notifications
You must be signed in to change notification settings - Fork 210
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
moving the cursor does not reset spacebar multi-tap #242
Comments
I can't replicate this for some reason. |
it seems to happen mostly when you grab the cursor by it's native android handle & move it. not that much when i move it with spacebar swipes |
I think I may have found a fix for this one. |
still not fixed in 1.6.0, happened to me 3 times in a row while i moved the cursor thorugh it's native drag handle. i'd suggest maybe checking the cursor position before proceeding with the multitap? |
Not something I know how to do. |
PRs welcome. |
Another way to reproduce this is:
|
tried reproducing it exactly like you said, didn't happen to me. Maybe it's fixed now? |
. 3, it depends on the input. When I do it in the test field in the thumbkey settings, it is not reproducible. In the text field of this email it was.
|
, 3. oh yeah you are right it does. interesting.
Gesendet mit Outlook für Android<https://aka.ms/ghei36>
…________________________________
From: Nicco Kunzmann ***@***.***>
Sent: Tuesday, September 5, 2023 10:23:43 PM
To: dessalines/thumb-key ***@***.***>
Cc: FOSSMan ***@***.***>; Comment ***@***.***>
Subject: Re: [dessalines/thumb-key] moving the cursor does not reset spacebar multi-tap (Issue #242)
. 3, it depends on the input. When I do it in the test field in the thumbkey settings, it is not reproducible. In the text field of this email it was.
—
Reply to this email directly, view it on GitHub<#242 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BA4J4LHKXVDFN4ITBLFJKHLXY6C47ANCNFSM6AAAAAAYNMQN4I>.
You are receiving this because you commented.Message ID: ***@***.***>
|
! 3.
can reproduce it in outlook.
Gesendet mit Outlook für Android<https://aka.ms/ghei36>
…________________________________
From: KraXen72 ***@***.***>
Sent: Wednesday, September 20, 2023 11:59:03 PM
To: dessalines/thumb-key ***@***.***>
Cc: FOSSMan ***@***.***>; Comment ***@***.***>
Subject: Re: [dessalines/thumb-key] moving the cursor does not reset spacebar multi-tap (Issue #242)
as far as i can tell, this has been fixed by #401<#401> or #424<#424>. I can no longer reproduce it! Can someone else try to reproduce it? Thanks!
—
Reply to this email directly, view it on GitHub<#242 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BA4J4LDUECGILXXN2UDLLBTX3NRKPANCNFSM6AAAAAAYNMQN4I>.
You are receiving this because you commented.Message ID: ***@***.***>
|
ah okay. i was testing it in the thumb-key input box, and i forgot that it doesen't happen there. |
One possible solution (i haven't looked at the code) would be to have a (configurable duration?) .5 second timeout for the double tap behavior |
I don't know how to add a configurable tap timeout, but this works-ish. If you go fast enough you can still hit the error state, and if you wait too long you lose the double tap. That's fine for double tap but kind of sucks for triple tap. Maybe you could hack it even more such that the timeout only gets checked when tapCount == 1?
In researching this, I came across InputConnection.requestCursorUpdates. I believe you could call that with requestCursorUpdates(CURSOR_UPDATE_MONITOR, CURSOR_UPDATE_FILTER_INSERTION_MARKER), and implement updateCursorAnchorInfo such that it would reset the tap count. That seems like the proper solution, but I couldn't figure out how to do that since I'm pretty unfamiliar with android dev. Anybody have any ideas or tips? |
@dessalines should I make a pull request with that change and a todo comment describing the better cursor updates solution, or would you prefer to wait for the cursor updates solution? The cursor updates solution could also be used to avoid the case where you end a sentence (which capitalizes the keyboard), then move the cursor manually and accidentally type a capitalized key in the middle of a sentence. The logic on cursor update could include something like
|
I tried this solution last weekend actually, but couldn't get it working. Its the right way to handle it, rather than a tap timeout. It needs someone other than me to take a crack at it. |
huge if true |
Looks like this is still an issue on some text fields. |
Which ones? also there's a good chance the magic number of 15 that I used isn't ideal, or could be calculated based on the device, like pixel density of the screen or something |
A lot of them: Signal and Markor so far. |
what are you typing to reproduce it? |
Its very inconsistent. Occasionally if I go to those text fields, spacebar multitap doesn't work at all. Then other times they work, but the move cursor doesn't that character replacing bug again. |
Hmm, to me it sounds like the magic number of 15 needs to be figured out in a more device-specific way then. |
Thumb-Key Version
1.3.0
Describe the bug
if you type space, move the cursor and type it again, it deletes the last letter and adds a comma. (i do not want to turn off spacebar multitaps, just want it to start from the beginnig of the character cycle if the cursor moves)
To Steps to reproduce the behavior:
| = cursor
The text was updated successfully, but these errors were encountered: