Skip to content
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

VirtualKeyboard: delete word on backspace swipe west #11843

Merged
merged 6 commits into from
May 25, 2024

Conversation

hius07
Copy link
Member

@hius07 hius07 commented May 18, 2024

Closes #11831.


This change is Reviewable

@hius07
Copy link
Member Author

hius07 commented May 18, 2024

Word delimiters, discussable:

local delimiter = is_word and "[\n\r%s.,;:!?]" or "[\n\r]"

@poire-z
Copy link
Contributor

poire-z commented May 18, 2024

If I have the cursor in the middle of a word, ie this repo|sitory should, does this deletes the full word (and I end up with this |should) or just the part of the word before the cursor (ending up with this |sitory should) ?

@Frenzie
Copy link
Member

Frenzie commented May 18, 2024

On Android it's the last one, which seems more intuitive but perhaps also less useful?

@Frenzie Frenzie added this to the 2024.05 milestone May 18, 2024
@hius07
Copy link
Member Author

hius07 commented May 18, 2024

It deletes the full word (between delimiters) under the cursor.
And deletes an extra space, if needed.

@poire-z
Copy link
Contributor

poire-z commented May 18, 2024

I also feel deleting just the part before the cursor is more intuitive, at least what I would expect.
But given how hard it is to precisely position the cursor with our fat fingers, deleting the full word might be fine, once we are used to that behaviour.

And deletes an extra space, if needed.

You mean the cursor is at the immediate end of the previous word, and I need to input a space before typing my new word?
I would expect to not have to type that space, but may be this behaviour is needed to a new backspace swipe can delete another previous word, and we can easily do that in sequence?

@hius07
Copy link
Member Author

hius07 commented May 18, 2024

may be this behaviour is needed to a new backspace swipe can delete another previous word, and we can easily do that in sequence?

Yes, I thought it was convenient.

@Frenzie
Copy link
Member

Frenzie commented May 20, 2024

So would we rather only left of cursor or whole word?

@hius07
Copy link
Member Author

hius07 commented May 23, 2024

Added dashes as word delimiters.
Swipe west deletes part of the word left to cursor.
Swipe north deletes the whole word.

Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good to me

Copy link
Contributor

@poire-z poire-z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge and see how it works.

@Frenzie Frenzie merged commit 556e5bd into koreader:master May 25, 2024
3 checks passed
@mergen3107
Copy link
Contributor

Just to be clear, we now have FOUR backspaces?

  1. Just tap backspace to delete a character.
  2. Long-tap to delete a whole line
  3. Swipe west to delete a part of the word until a dash
  4. Swipe north to delete a whole word.

Shouldn't it be easier if (1) stays, but 2-4 are put into a popup menu that opens with a long tap?

@Frenzie
Copy link
Member

Frenzie commented May 25, 2024

I don't know, it's roughly the same as on most other mobile keyboards. :-)

I don't think we've implemented ctrl+backspace on keyboard yet.

@hius07 hius07 deleted the del-word branch May 26, 2024 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: Virtual keyboard: whole word deletions
4 participants