-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
FR: Virtual keyboard: whole word deletions #11831
Comments
The usage of Backspace was rejected in this thread: #11182 (comment). Another way is to extend the Clipboard dialog: |
I don't think swipe on backspace was covered. Swipe left on backspace to delete a word (as in up to the first space) makes sense to me. |
Right, I remember that thread. If I understood correctly, the final consensus was that long-press on backspace should not be changed, but it didn't seem that anyone was against swiping on the button. On the contrary; here, @poire-z specifically said that swiping on backspace to access additional functions would be okay, and that comment received wide support. However, I am a bit confused because that comment also implied that it would be in conjunction with a key pop-up, as on all other keys, but on all other keys the pop-up is opened with a long-press, which again was rejected for the backspace key. How about this: Engaging the ⌥- button will change the ⌫ button to something like ⌫…, and this will then enable a key-pop-up on long-press and corresponding swipes. It could have the following options: swipe north to delete from the beginning of the paragraph, west to delete a word left to the cursor, and south to delete to the end of the paragraph. (I would advise against diagonal swipes here as the risk of accidental deletions from misdrawn or misinterpreted gestures would be too high.) However, your suggestion with the expanded Clipboard dialog could also be a possible solution, although a little less accessible and less intuitive than options directly on the keyboard itself. Would it be possible to press Or lastly, a combination of the two ways might be of interest: Engaging ⌥ will change the ⌫ to ⌫word (or some symbol) and will delete whole words on short taps. Long press could delete the paragraph (up to the cursor). No pop-up or swipes. And the additional delete and copy features (sans "word"), could still be added to the Clipboard dialog, where these lesser used options could still be accessed. |
@poire-z wrote that if a keyboard popup were implemented, that's how he thinks it should be. Not that there should be a popup. |
Got it. Thanks for clarifying. |
It actually works like "erase to start of paragraph": koreader/frontend/ui/widget/inputtext.lua Lines 875 to 879 in 46449eb
Currently long-pressing on Backspace has no visual indication, so we can add silent "swipe west" to delete a word under cursor, and mention it in the User guide only. |
Sounds good to me. It also works that way on several other touch keyboards btw. |
Taken from #11843 for broader discussion. |
|
Currently yes for one space too, to keep the punctuation character close to the previous word, I mean: I think it should depend on what is the more frequent action: if we write a new word instead of the deleted one, the space should not be deleted; if we just delete a word, the space should be deleted. Also it depends on the question 2. |
My preference would be to include hyphens and (especially) underscores as word delimiters. Both would be useful for renaming parts of filenames (e.g., I would also include dashes as word delimiters –, —, ―. They are often used in lieu of spaces in books, but always delimit words. Other characters may be helpful as well, but too many would unnecessarily restrict the flow of deleting chunks of text. I guess the list can always be adapted later, after some practical use and experience with the feature?
I'm a bit conflicted on this question. Normal user expectation would indeed be just the part left to the cursor, but it's also true that it makes it a lot easier on an e-reader to place the cursor anywhere on the word to delete the whole word. So I'd say to keep it as is. [Not expecting this, but just an idea-- delete just left of the cursor on swipe west; delete the whole word on swipe north-west. (I know I said preferably no diagonal swipes before, but here the damage that could be done between deleting parts of a word or a whole word would be rather negligible.)]
Yes, delete IMO. |
Dunno if it can help and is usable, but xtext has a method to get the word boundaries of the word at some position in a string, using libunibreak's word break (so, Unicode) notion of where words break :) koreader/frontend/ui/widget/textboxwidget.lua Lines 2080 to 2084 in 40814bf
It currently just returns the word, but it could additionally return the indices if needed. No strong opinion about the questions asked. |
Another idea that I think would be very useful (on top of the short swipes for words): Swipe west >2/3 of the screen-width to delete from the cursor to the beginning of the line. |
Note that long-press already does that. |
It deletes to the start of the paragraph (see hius07's comment above). I also used to think it was the beginning of the line (because most input masks are one-lined, and user patches usually have short lines that are treated like separate paragraphs), but while editing bookmarks from PDF highlights I noticed that everything to the beginning gets deleted. (Because paragraph breaks don't carry over into PDF highlights, there aren't any paragraph breaks.) |
Potayto potahto, change it then. ;-) |
Does your feature request involve difficulty completing a task? Please describe.
The new bookmark-edit feature often requires me to delete short sections from within a highlight, usually because cross-page highlights from scanned PDFs include unwanted information such as footnotes, page numbers, or book/chapter titles from the bottom of the initial page.
The virtual keyboard only allows deleting single characters (short tap), or everything up to the beginning of the line (long-press). However, as highlighted text from PDFs does not include any hard line- or paragraph-breaks, all text from the cursor to the beginning of the highlight is being cleared.
Describe the solution you'd like
Swiping on the virtual backspace key does not have any function at the moment, AFAIK. I think that swiping left on the backspace key would be an intuitive and user-friendly way of deleting whole words to the left of the cursor.
Describe alternatives you've considered
A possible alternative (or additional) feature could be that long-press on the backspace key only deletes to the beginning of the line on screen, without consideration to any line- or paragraph-breaks that are invisible to the user.
Additional context
Besides editing bookmark text, single word deletions would also be helpful in smaller editing jobs such as custom TOCs, notes, filenames, and in the text editor.
The text was updated successfully, but these errors were encountered: