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

Text input improvements #28

Open
9 of 15 tasks
0HyperCube opened this issue May 5, 2023 · 10 comments
Open
9 of 15 tasks

Text input improvements #28

0HyperCube opened this issue May 5, 2023 · 10 comments

Comments

@0HyperCube
Copy link
Contributor

0HyperCube commented May 5, 2023

  • Click to edit at particular character
  • Drag to select range
  • Double click to select a word
  • Ctrl + Arrow key to move by word
  • Shift + Arrow keys to select
  • Ctrl + backspace to delete word before the cursor
  • Numpad del to delete the character after the cursor (Ctrl deletes the word)
  • Ctrl + A to select all
  • Cut, copy and paste shortcuts (need to access system clipboard)
  • IME support
  • Proper mouse cursor icon on hover and a blinking caret in the text box
  • Optional multi line support (adding another component would be reasonable)
  • Alignment and justification
  • request_focus should put cursor at the end of the field
  • Programmatically set selection / cursor location
@presiyan-ivanov presiyan-ivanov self-assigned this May 6, 2023
@presiyan-ivanov
Copy link
Collaborator

I will look into the word-based actions and clicking at a glyph

@moon989

This comment was marked as off-topic.

@presiyan-ivanov presiyan-ivanov removed their assignment Nov 20, 2023
@thewizzy
Copy link
Contributor

thewizzy commented Nov 20, 2023

Updated list based on my testing. I have started work on the remaining ones https://github.com/thewizzy/floem/tree/select_delete_range (also https://discord.com/channels/946858761413328946/1176271038653415444)

  • Click to edit at particular character
  • Drag to select range
  • Double click to select a word
  • Ctrl + Arrow key to move by word
  • Shift + Arrow keys to select
  • Ctrl + backspace to delete word before the cursor
  • Numpad del to delete the character after the cursor (Ctrl deletes the word)
  • Ctrl + A to select all
  • Cut, copy and paste shortcuts (need to access system clipboard)
  • Del deletes the current selection, putting the cursor at the start of the range
  • IME support
  • Proper mouse and blinking cursor
  • Optional multi line support

@dominikwilkowski
Copy link
Contributor

Some notes here about mac compatibility

Numpad del to delete the character after the cursor (Ctrl deletes the word)
Two things:

  1. On mac a user would expect Opt + Delete to delete words left from the cursor instead of Ctrl
  2. This seems to be already working now with Ctrl + Delete

Ctrl + Arrow key to move by word
Opt + arrow keys would move the cursor by word (right now Ctrl + arrow keys is tied by default to "spaces" on mac which moves the screen). On mac you also get Shift + Opt + Arrow key to select word for word (which right now is implemented but with Ctrl instead of Opt

On mac you also usually get:

  • Cmd + Delete to delete everything left from cursor
  • Cmd + z to go back in history (not sure how large the buffer is here)

@pieterdd
Copy link
Contributor

pieterdd commented Dec 29, 2023

This open task is working for me on Windows and Wayland on GNOME:

Double click to select a word

Can you break down what needs to happen for IME support? Is this about enabling user input of special characters like łéçô? Is right-to-left support in scope? One thing I noticed during my testing is that a test application crashed when inputting é twice in a row. The issue does not trigger when I paste the é character twice from clipboard, only with direct input. (Edit: I opened #235 for the é bug and I hope to submit a fix this weekend.)

@jrmoulton
Copy link
Contributor

Another issue is being able to align/justify text. Text inside of TextInput doesn't respect alignment and justification

@dominikwilkowski
Copy link
Contributor

dominikwilkowski commented Jan 1, 2024

I'd also like to add that request_focus() on an input field should put the cursor at the end of the input field text. right now it's at position 0 no matter how much is already inside the field.

@csc-chicken

This comment was marked as off-topic.

@dwuertz
Copy link

dwuertz commented May 11, 2024

I'd also like to add that request_focus() on an input field should put the cursor at the end of the input field text. right now it's at position 0 no matter how much is already inside the field.

I'd rather have the current text selected in this case. This is generally more useful (e.g. makes the common case easy, which is to replace the entire text) and is in line with established UI frameworks/patterns (e.g. GTK, QT, Windows).

@dominikwilkowski
Copy link
Contributor

Let's make sure what happens in input fields is what each OS is expecting to happen. It sounds like windows has a different behavior than macos etc.
Nothing is worse than editing something and your cursor is jumping around in unexpected ways.

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

No branches or pull requests

9 participants