Skip to content
TwinScope0.3.10

Giving it two inputs

Four ways in, one destination. Drop, browse or paste; the drop zones never learn which route an input arrived by, and neither does the engine that compares it.

GIF · press play
Paste fills the empty side first. Two pastes fill both slots, in reading order.

Every route in#

RouteKeysWhat it does
Drag and dropDrops a file, folder or image onto one zone
File picker⌘OOpens twice: BEFORE, then AFTER
Folder picker⌘⇧OThe same, for directories
Per-zone buttonsBrowse file… and Folder… fill just that one side
Clipboard⌘V or ⌘⇧VReads the system clipboard into the empty side
Swap⌘⇧SExchanges the two sides

All of them converge on one function that sets one side's input. Nothing downstream — detection, the engine, the view, export — can tell how an input arrived.

A filled zone shows the name, the size, the kind TwinScope decided it is, and the first four lines of the content, so you can see at a glance that you dropped the right thing.

Drag and drop#

Drop anything onto BEFORE or AFTER. The zone highlights while a drag is over it and says Release to compare.

CaseBehaviour
One file or folderRead, detected and loaded into that zone
Several files at onceOnly the first is used. A zone holds one input, and silently choosing one of five would be worse than ignoring four
A text selection dragged from another appBecomes an input named dropped-a.txt or dropped-b.txt
A drag carrying only whitespaceIgnored — an accidental drag leaves the zone as it was

The native pickers#

⌘O opens the file picker twice, in sequence — its title reads Choose the BEFORE file, then Choose the AFTER file. Two native dialogs at once is a mess, and the order the titles promise is the order you are already reading in.

  • Cancelling the first dialog stops there and changes nothing.
  • Cancelling the second leaves BEFORE filled and AFTER empty.
  • The Browse file… and Folder… buttons inside a zone open a single dialog for that side only.

⌘⇧O is the same flow for directories, which is how a folder comparison starts.

The clipboard#

This is the route that makes TwinScope worth leaving open: copy, paste, copy again, paste again, read.

KeyWhen it works
⌘⇧VAlways
⌘VWhen you are not typing into a field

Plain ⌘V is handled as a paste event rather than as a key binding, which lets the platform decide what counts as a paste — so it keeps working inside every text field, and OS variants come along for free. If the paste target is an input, a textarea or anything content-editable, the field gets the paste and the comparison is left alone.

Clipboard holdsResult
TextAn input named clipboard-a.txt, or clipboard-a.json when the content parses as JSON. The kind comes from the content, never from that name
An imageAn input named clipboard-a.png, with its pixel dimensions shown in the zone
Nothing, or only whitespaceNothing happens

Pastes fill A first, then B. A third paste replaces BEFORE, which is what a third paste almost always means.

Swapping sides#

⌘⇧S, or the ⇄ button between the two zones. Before becomes after.

With a comparison already open, swapping re-runs it the other way round rather than dumping you into an empty workspace — and the engine options you had set survive the swap, because they describe the request rather than the reply.

Changing an input clears the result#

Setting either side clears any finished comparison, along with the options that belonged to it and any drill-in you were inside.

That is deliberate: a stale diff shown against new inputs is worse than no diff at all. A new input may also mean a different engine entirely, whose options have nothing to do with the previous one's.

Large inputs#

SizeWhat travels
Up to 10 MBMain reads the text once so the zone can preview it, and the content travels with the input
Over 10 MBOnly the path. The zone reads read on demand, and the engine worker opens the file itself
ImagesRead as bytes for the in-window image engine, which refuses anything over 64 MB with a message naming the file and its size

Multi-megabyte strings never cross the IPC boundary. Above 10 MB a text comparison also asks for confirmation before it starts — see Running a comparison.