Skip to content

ClipboardForm: add menu to copy text by mouse#2037

Open
bschwarzent wants to merge 1 commit intoreleases/26.1from
features/bsh/26.1/378797_copy_menu
Open

ClipboardForm: add menu to copy text by mouse#2037
bschwarzent wants to merge 1 commit intoreleases/26.1from
features/bsh/26.1/378797_copy_menu

Conversation

@bschwarzent
Copy link
Copy Markdown
Member

Instead of pressing ctrl-c or using the context menu, the user can now also click the "copy" menu to copy the selected text to the clipboard.

Additional changes:

  • Remove EscapeKeyStroke, instead mark the form as closable. This has the same effect but the F1 keystroke hint is positioned much nicer.
  • Cleanup some clipboard related texts.
  • Make instruction label non-selectable, just like any other form field label.

378797

@bschwarzent bschwarzent self-assigned this Feb 19, 2026
In addition to pressing ctrl-c or using the context menu, the user can
now also click the "copy" menu to copy the selected text to the
clipboard. The copy menu is shown instead of the normal ok button when
the form is in "copy" mode. The cancel button is now always visible so
the form can be closed without copying anything.

The text is computed by the new method ClipboardField#getSelectedText.

Additional changes:
- ClipboardForm: cleanup some clipboard related texts.
- ClipboardForm: make instruction label non-selectable, just like any
  other form field label.
- ClipboardField: prevent default action for all potentially destructive
  keystrokes to give the impression of a "readonly" input field. The
  field is not generally marked as disabled because in "paste" mode, the
  paste action must be possible. The event is _not_ stopped from
  bubbling up to the form, because the form might still use some of the
  keystrokes (e.g. ENTER to close the form).
- Use same dialog size in "copy" and "paste" mode.

378797
@bschwarzent bschwarzent force-pushed the features/bsh/26.1/378797_copy_menu branch from d51f09e to 29c8b88 Compare March 4, 2026 15:52
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.

1 participant