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

Common text selection keys should work in TextBoxes #1679

Closed
6 of 8 tasks
profexorgeek opened this issue Jan 27, 2025 · 2 comments
Closed
6 of 8 tasks

Common text selection keys should work in TextBoxes #1679

profexorgeek opened this issue Jan 27, 2025 · 2 comments
Assignees
Labels

Comments

@profexorgeek
Copy link
Collaborator

A user requested that TerraScriber textboxes should support expected input text editing features. Here's a list of ones that I just tested. I pre-checked things that already work:

  • Pressing home should move the caret to the beginning of the line
  • Pressing end should move the caret to the end of the line
  • Pressing shift+home should select from the caret to the beginning of the line
  • Pressing shift+end should select from the caret to the end of the line
  • Pressing arrows should move the caret
  • Pressing shift+arrows should change the selection accordingly
  • Pressing CTRL + A should select all text
  • Pressing CTRL + arrows should jump to whitespace characters

It looks like most of these already work great. However:

CTRL + A is not implemented at all. This should be implemented

CTRL + left arrow has an "off by one" issue. It should navigate through the text string in reverse, jumping to the end of each whitespace character. Instead, it jumps to the [end + 1] and ends up just after the first character after whitespace. Repro this by creating a text box, typing a string with spaces in it, and pressing CTRL + left to navigate backwards through the sentence. Notice that the caret doesn't jump to the expected place.

@vchelaru
Copy link
Owner

vchelaru commented Jan 28, 2025

  • Pressing CTRL + A should select all text
  • Pressing CTRL + arrows should jump to whitespace characters

@vchelaru
Copy link
Owner

Fixed by vchelaru/Gum@df24f29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants