Comments (17)
3. but probably not if there's only one?
Currently yes for one space too, to keep the punctuation character close to the previous word, I mean:
good boy,
after deleting "boy" becomes good,
(without the space).
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.
If only the part is deleted, the space should be kept for sure.
from koreader.
The usage of Backspace was rejected in this thread: #11182 (comment).
Another way is to extend the Clipboard dialog:
from koreader.
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.
from koreader.
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 Delete word
several times while previewing the text on the dialog behind it? (At the moment each action closes the dialog.) And will the cursor position be updated even when the dialog is not in the foreground?
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.
from koreader.
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.
@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.
from koreader.
@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.
from koreader.
Quickly rereading all this and what I and others wrote in the linked comment, I think I would be fine with a keypopup (and I would not mind breaking habits, as people would just get a popup and could quickly tap on a nearby key to erase to start of line). Engaging the ⌥- key is also a solution.
But with both of these, the main issue is: how to express on a 1-or-2-glyph key popup key "erase to previous word", "erase to start of visual line", "erase to start of paragraph"... I can't think of anything obvious that would not need the user to test it and see - and so addtionally a way to restore the state of text before that last action :/
(⌫word might be too wide - even wider in some languages. Dunno if popup keys can have larged width...)
I don't really like having these buttons on the clipboard widget as they feel a bit out of context (but not that much, Copy would act on the same "segments")
but somehow, it may be the most clear way to have it.
(It would also need to be positionned a bit out of the text, so one get a chance to see where the cursor is.)
from koreader.
"erase to start of visual line"
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.
from koreader.
Sounds good to me. It also works that way on several other touch keyboards btw.
from koreader.
Taken from #11843 for broader discussion.
The gesture is "swipe west" on Backspace.
(1) What characters should be treated as word delimiters?
(Currently "[\n\r%s.,;:!?]"
. I excluded underscore and hyphen for purpose. Doubt about different brackets)
(2) Should it delete the whole word or a part left to cursor?
(Currently: the whole word, it is hard to set the cursor precisely)
(3) If after the whole word deletion we get two consecutive spaces, should one of them be deleted?
(Currently: delete, it allows easy deletion of several words in a row)
from koreader.
- No hyphen should be fine.
- I'm inclined towards left of cursor but it's not a strong preference.
- I think it should be deleted when there are two, but probably not if there's only one?
from koreader.
(1) What characters should be treated as word delimiters?
(Currently "[\n\r%s.,;:!?]". I excluded underscore and hyphen for purpose. Doubt about different brackets)
My preference would be to include hyphens and (especially) underscores as word delimiters. Both would be useful for renaming parts of filenames (e.g., 20240521_142213-033.pdf
).
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?
(2) Should it delete the whole word or a part left to cursor?
(Currently: the whole word, it is hard to set the cursor precisely)
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.)]
(3) If after the whole word deletion we get two consecutive spaces, should one of them be deleted?
(Currently: delete, it allows easy deletion of several words in a row)
Yes, delete IMO.
from koreader.
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.
Also, CJK chars are (mostly) single words, so with this on CJK text, you may delete the whole sentence :) but I guess CJK readers/writers just won't use it.
No strong opinion about the questions asked.
from koreader.
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.
from koreader.
Note that long-press already does that.
from koreader.
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.)
from koreader.
Potayto potahto, change it then. ;-)
from koreader.
Related Issues (20)
- Koreader crashes while checking up dictionaries HOT 6
- Setting of "Alt Status Bar" is not remembered HOT 3
- Image and text are not displayed on the same page HOT 3
- OPDS Connection to Calibre does not display all books. Only in Title View. HOT 12
- Norwegian-english dictionary
- translation: Two strings are not translatable
- "Automatic Dimmer" should be suspended when "Autoturn" is active
- (mupdf) Dictionary fallback symbols HOT 5
- Cloud upload crash (webdav) HOT 3
- Crash when jumping to previous position HOT 29
- Keyboard in FM starts with special characters HOT 1
- Some DoubleSpinWidget UI components do not reflect their state correctly HOT 5
- Not working on Kobo libra colour HOT 6
- Segfault when opening .epub generated by a specific RSS feed due to 0-width image in SVG HOT 6
- Arabic keyboard ث letter is doubled, ظ is missing HOT 3
- Script Is not detecting zip file HOT 2
- [Solved]: Failed to connect to wpa_supplicant control socket: /var/run/wpa_supplicant/eth0 HOT 5
- Power off cover image garbled on Kobo Libra H2O HOT 5
- Crash on start HOT 3
- FR: Allow Drawing in books and access to notebooks. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from koreader.