Skip to content

Clipboard

nodemode-ai edited this page Dec 3, 2026 · 2 revisions

Clipboard

From 0.7.0 Copy, Cut and Paste work on the drawing, between FormChem windows and with other programs, in several forms at once. The engine side of the text formats is in docs/FORMATS.md.

Copy, Cut and Paste

Command Keys What it does
Copy Ctrl+C (Cmd+C) copies the selection, or the whole page when nothing is selected
Cut Ctrl+X (Cmd+X) copies the selection and removes it, as one undo step
Paste Ctrl+V (Cmd+V) pastes at the pointer when it is over the canvas, at the right-click point when you use the canvas menu, else in the middle of the view; the pasted items are selected and the paste is one undo step
Paste Special... Ctrl+Shift+V (Cmd+Shift+V) lists what the clipboard holds and pastes the one you pick (Enter or a double-click)

In a text field (an atom label, a dialog, the find bar) the keys edit text as usual. Pasting the same thing again at the same point steps each copy by 10 pt. With no drawing open, Paste makes a new one. Duplicate (Ctrl+D) uses the same machinery, so the copy keeps stereo groups, R-groups and reaction steps.

What Copy puts on the clipboard

One Copy writes several forms, and each program takes the one it understands:

Form Who reads it
The FormChem drawing FormChem windows: everything comes back exactly, with its look (a structure copied from a 14.4 pt drawing into a 30 pt one keeps its size and line widths), its abbreviations, R-groups, stereo groups, reaction steps and placed pictures
SMILES (reaction SMILES for a reaction) text editors, notebooks, chat
HTML with a PNG picture (the drawing rides along inside it) word processors and slides; pasting it back into FormChem restores the drawing
SVG and PNG pictures drawing programs, where the platform allows it

Copy As

Edit > Copy As puts one chosen form on the clipboard: SMILES, CXSMILES, Molfile, InChI, InChIKey, SMARTS, SVG, PNG or CDXML. A reaction becomes reaction SMILES or RXN. Copy as SVG also puts the full SVG on the clipboard as text, which pastes back into FormChem as the drawing; Copy as PNG carries the drawing in its HTML form. The status line says what was copied.

What Paste reads

In this order: a FormChem drawing, a picture that carries a drawing (an SVG or PNG exported or copied by FormChem), structure text in any format FormChem reads (SMILES, CXSMILES, reaction SMILES, molfile, SD, RXN, InChI, CML, CDXML), SMARTS (as a query structure), a plain picture (placed as an image) and plain text (a text object). Structure text takes your drawing's bond length. When the text holds something that could not be read exactly, a note says so.

From 0.9.0 a pasted chemical name is read: pasting "aspirin" opens Structure from Name with its structure, and Enter draws it (Names). Text that is not a name, or a name FormChem cannot read, still becomes a text object.

Platforms

Browser (Chromium) and the Windows app Linux app macOS app
Copy and Cut every form drawing, SMILES and HTML drawing, SMILES, HTML and PNG
Paste everything above everything above; pictures are read through the clipboard API everything above, through the system Edit menu
Edit menu in-window in-window Cut, Copy, Paste and Select All are the system's own items, so they act on the drawing as well as in text fields
  • In Chromium (browsers and the Windows app), a PNG that another program put on the clipboard as image data pastes as a plain picture, because Chromium strips the drawing out of clipboard PNGs. Copy the PNG file itself in your file manager, or use FormChem's own Copy, and it pastes back editable.
  • Chromium also cleans SVG on the clipboard (the fonts and the drawing are dropped), which is why Copy as SVG adds the text form.
  • On macOS, Paste from the canvas right-click menu may show WebKit's small Paste button, which you click once; Cmd+V and Edit > Paste do not.
  • The macOS app was not tried for this version.
  • The desktop windows on Linux and Windows are allowed to read the clipboard from the page, which Edit > Paste and Paste Special need there.

For agents

copy-smiles, copy-cxsmiles, copy-molfile, copy-inchi, copy-inchikey, copy-smarts, copy-svg, copy-png, copy-cdxml and paste-special run through run_command; cut, copy and paste too. To read a structure as text without touching the clipboard, the export route in docs/FORMATS.md is simpler. See Agents.

Clone this wiki locally