-
-
Notifications
You must be signed in to change notification settings - Fork 164
Implement Swipe to Select While Holding Shift #1512
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?
Conversation
I just want to add 2 things that are somewhat related to this PR:
|
Hi, thanks for the notes, so far in my testing I haven't found anything significant related to the layout switching but some things I found so far:
|
I've implemented a similar gesture in my D-pad homebrew. It's a challenging thing. I'll point out some development considerations:
Some UX considerations:
In developing the D-pad, I've put this gesture in the navigation keyboard's Select Word button, positioned at the center of the arrow keys: ![]() But that's not a final decision. I've also considered associating the gesture with the "selection mode" I'm developing—I really don't know, it's a pretty hard UX problem. |
Fuck Google so much, seriously. In the documentation they write "Editor authors, be ready to accept a start that is greater than end.". Really great way of introducing perceived "bugs" in other (keyboard) apps. Things would be so much easier if they (and others, specifically looking at Mozilla) would bother to handle this call as documented.
Thanks for reminding me of this. Maybe I was too enthusiastic and pushed a bit too much work regarding more ideas on you... Anway, I agree it would be easier with #983 done. |
I started testing the implementation that keeps start before end, but the fallback hardware input movement only moves selection end so it breaks over emoji. Will have to look into it more😬
Unrelated, but I've noticed that the backspace swipe gesture doesn't handle emoji so you can slice them in half.
It doesn't trigger capslock when holding space at the same time. But I've been thinking about this, it could be quite useful for single hand use like you said and would make the logic of when to trigger selection easier too. |
Flags? Or emojis more generally? |
I think generally (probably every emoji that consists of more than 1 codepoint). I vaguely remember adding a fixes to some places (e.g. cursor movement), but probably not to delete swipe. |
Do emojis ever have more than 2 codepoints? |
this should not be necessary according to documentation, but apparently there are apps (even by Google!) that can't deal with documented behavior see comments in GH-1512
Yes I think some even have more than 10 (or maybe that was characters, but definitely more than 2 codepoints). As for the selection start before end, I think it should be generically set in Related: I tried setting the shift meta state when shift was enabled manually. This allows selecting using the arrow keys and similar (some only after extra work). Though maybe it should really be limited to work only with arrow and related keys, in addition to being optional. |
…ection start. Prepare for shift + space selection.
NOTE: Currently sets selection start as the 'anchor' point and then moves selection start around. This is different to delete swipe which moves around selection start. Is the behaviour of moving selection start around with a fixed selection end preferable? NOTE: many issues to fix.
325a6a5
to
47bf96b
Compare
@Helium314 Do you know if anyone has tried and found problems with implementing the scrolling using BreakIterator to jump over unicode grapheme clusters and avoid breaking visible characters? I've implemented it today and it appears to work quite well from my limited testing and doesn't add any performance hit over the existing codepoint counting + hardware fallback. Changing to using BreakIterator would make swipe to select very simple to implement if there aren't any other problems. |
[WIP]
Trying to add the ability to hold shift and swipe on the spacebar to select. (and understand the codebase as I go).
Deciding if SelectionStart should always be to the left of SelectionEnd, or if SelectionStart should be the anchor.
closes #653