Genta-Technology / kolosal-desktop

Apache License 2.0
0 stars 0 forks source link

Add `Shift + Enter` to Create New Line in Multi-line Text Input #14

Closed rifkybujana closed 2 days ago

rifkybujana commented 4 days ago

Add Shift + Enter to Create New Line in Multi-line Text Input

Description: We need to add functionality to support Shift + Enter to create a new line in the multi-line text input. Currently, pressing Enter submits the input, but users should be able to use Shift + Enter to add new lines while continuing to compose their message.

Tasks:

  1. Modify the multi-line text input behavior:

    • Add support for detecting the Shift + Enter key combination.
    • Ensure that when Shift + Enter is pressed, a new line is inserted into the text input rather than submitting the message.
    • Keep Enter functionality unchanged so it still submits the input when pressed without the Shift key.
  2. Ensure compatibility with existing input functionality:

    • Ensure that all other functionalities in the multi-line text input (e.g., word wrapping, text highlighting) continue to work correctly after adding the Shift + Enter feature.
    • Verify that pressing Enter alone still triggers the expected submit behavior.
  3. UI feedback for new line insertion:

    • Ensure the text input box correctly expands or adjusts when a new line is added using Shift + Enter.
    • Ensure that word wrapping, padding, and formatting are maintained as new lines are inserted.
  4. Testing:

    • Test Shift + Enter functionality across different platforms (Linux, macOS, Windows) to ensure consistency.
    • Test the multi-line input for various scenarios, such as inserting new lines at different positions, submitting text with and without new lines, and handling very long multi-line inputs.
  5. Update documentation:

    • Add documentation or tooltips (if applicable) to inform users about the Shift + Enter feature for adding new lines.
    • Update any existing documentation or UI help sections to reflect this functionality.

Acceptance Criteria:

Additional Context: