-
Notifications
You must be signed in to change notification settings - Fork 238
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
Add slide selection and deletion #424
Conversation
Nice! I was about to suggest slide deletion as implemented here - this is more familiar for GBoard users like myself that prefer swiping over typing 👍 |
Forgot to say that slide to delete works by sliding on the delete key. Selection on spacebar slide works by sliding upwards and then horizontally. That way its easy to slide back to something you want to change, slide up and slide horizontally to select text. Then you can delete or start typing. Both of these examples are in the gifs above |
Wow this is so cool! I was going to attempt this myself, but couldn't think of a good way to do the selection. Swiping up is a great idea! I just tested it and it's working perfectly, and feels really smooth. |
Thanks for testing @sslater11! Btw, nice work on the emoji picker 🎉 |
this is great! |
@KraXen72 I tried to increase threshold for "activation" of selection when sliding to delete. This is currently set to an factor of slide sensitivity, which is working for me. Now I can swipe to delete word and slide to delete backwards. The consequence is that I have to slide a little longer before slide to delete activates. Note that if slide sensitivity is set very low, < 10, its hard to swipe. We could of course make another entry in settings, but I think it's better to not clutter the settings menu with many similar options. What do you think @dessalines ? |
ah okay. this is good. not sure how intuitive it is, but it sounds pretty easy for users to find out on their own without instructions. although, it should be disable-able if somebody wants to. |
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.
This works well and is really intuitive, thx!
Be sure to add how to use this on the README user guide section.
app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardKey.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardKey.kt
Outdated
Show resolved
Hide resolved
@dessalines moved start selection code into own function. Also looked into hints from android studio and resolved them. I'm usually working with Emacs and languages without such tooling, therefore I tend to forget that they exist. Thanks for the feedback! Will add it to the README! |
d8b19f3
to
fd73e1d
Compare
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.
Works great, thx!
EDIT: in the future, just merge from main rather than rebasing, because rebase rewrites history and breaks collaboration for anyone else who has pulled down your changes.
First of all, congrats on releasing v2.0.0. Emoji support is a great addition to the keyboard!
I've been working on slide selection and deletion. Implemented it first via keypress (Shift + arrows). That didn't work in every app so I tried to use ime functions. It seems like the current implementation is working ok, but please test it. Hard to find every bug as some apps behave differently. I introduced a new type, selection. This was just to keep things a little simpler, not having to pollute the keyBoardKey with several variables related to selection.
Maybe the value 255 on line 195 and 257 should be larger. It was set this small in order not to slow down execution. I have since changed the code to not call it more than once per selection, so it probably can be set higher without impacting execution time.
This pull request also resets multitap actions after sliding.
Selection:
Deletion: