Open maverick74 opened 1 year ago
This may be a bit tricky, but I think it is possible by handling MotionEvent.ACTION_MOVE
in SoftKey.onTouch()
then and using it in SoftBackspaceKey
, possibly with a handleSwipe()
function.
I've been thinking about this...
Instead of swipe maybe a Tap+LongTap (as in "holding the delete") could be easier...
And if you keep holding it, it would keep on deleting one word at a time...
Swipe to delete sounds good to me, there is no need to make it more complicated. I haven't researched how to do it, though.
One more thing, deleting more than one character at a time will become easier after #170, when it will become possible to select text and cut/copy/paste/delete with a single click. The selection method itself is described in a kind of complicated way, but I think I have ideas how to make it simpler.
However, as of now, I am focused on other features. This will not be released anytime soon.
No pressure!
My intention is not to speed this up or something, it's just to share "way outs" (It's also not that "you don't know what you're doing" or something like that. It's just that there are various ways to accomplish one effect and sometimes we don't remember every single one... It's my way to try to help...)
No worries, I'm from the Balkans, I don't get offended for nothing. :slightly_smiling_face:
I'm also sharing my opinion. I've seen the swipe-to-delete function in other keyboards, so I think it is intuitive and relatively easy to do. For this reason, I like it better.
But won't accelerating it cause loss of control of exactly what we want to delete?
Swiping left would allow deletion of "just" the last word! And, if holding it, it would delete one word at a time...
this would, probably, give users more control of the deletion process...
(but, then again, I have no idea of how you're doing it so it may work...)
There will be a slight delay, so you will be able to stop at the right time. See the attached video.
https://github.com/user-attachments/assets/63ed4c9b-59bd-4cb3-9507-0b32db1ccd2d
There will be a slight delay, so you will be able to stop at the right time.
Hum, I see!!! It might work.... I still have some doubts about deleting a single word but I'll say more after I put my fingers on it 😀! You got me half convinced with the video 🤣
Never mind, I was able to add swiping to all buttons. To be honest, the effort was really worth it. The code looks much nicer and cleaner, and on top of that, I was able to use it for resizing too.
I'm not exactly sure if i should open a new bug report or not because i'm not sure i can say it's a bug:
still, sometimes, swiping left deletes more than one word (sometimes, it apparently stops in the middle of another word).
the thing is: i can only seldom replicate it... maybe i'm doing something wrong... if you @sspanak think it's worth it, i'll submit a bug report... but it's a tricky thing............
v39.0 will probably fix that. I've noticed there is a bug which sometimes causes accidental double click or click and swipe, or hold and swipe within a couple of milliseconds, which would cause Backspace to delete more characters than expected.
If the problem persists even after updating to v39.0, please create a new bug.
It REALLY is a lot better!!!
But, sometimes, it still happens some weird deletions!
Do you think
https://github.com/sspanak/tt9/commit/d47528f5502757863b75faaa962c32edab23d63e
may help or will we need to try to track it?
It still happens sometimes. I'll have to revisit that part of the code. I don't like it anyway, it is overcomplicated.
Edit: I made it even more complicated but I hope it finally works! I'll test it in the following days and if everything is fine, I'll push the new release.
On the on-screen keyboard, it would be nice if we could swipe left on the delete button to delete the last word!
Its not an essential feature, just a nice one!