Define Word is a launcher command and a fallback. The command opens the dictionary screen (.dictionary)
empty; the fallback opens it on whatever was typed. The search field stays the term, so a different
word is one edit away. Everything is read from the dictionaries enabled in Dictionary.app: no network,
no bundled word list.
- The command gates the fallback, never the reverse. Define Word has no feature pane, so
Settings › Commands is its switch: while the command is hidden there (itself or the whole Commands
category),
FallbackCoordinatoroffers no Define Word fallback and Settings › Fallbacks does not list it. While it is visible, the fallback's own checkbox hides just the fallback, leaving the command searchable. - The page comes from an undocumented call, resolved at run time. The public
DCSCopyTextDefinitionreturns one unbroken line, soDictionaryServiceasks for the record's XHTML throughDCSGetActiveDictionaries,DCSCopyRecordsForSearchStringandDCSRecordCopyData, what Dictionary.app itself reads. They are found withdlsym, never linked: a macOS that drops one loses the layout and falls back to the public plain text, rather than failing to launch. - The span classes are the only structure, and
DictionaryMarkupis the only reader of them.hgis the headword,posgthe part of speech,se2a numbered sense,msDict(msThesin a thesaurus) its definition or at_subsensebullet,notean aside,x_xoLblBlka section label (ORIGIN,PHRASES). Every Oxford bilingual pair (Chinese, Japanese, Korean, Vietnamese, French, Spanish, German, …) shares a second schema mapped onto the same blocks:hwgthe headword,grambthe part of speech,semba sense numbered by itsty_label tg_semborsn,exgan example,idm/pvg/cwg/drvga phrase under anIDIOMS-style label. Ansninside an example is its bullet, never a sense number. Line breaks follow each dictionary's ownDefaultStyle.css:x_xo1is a block everywhere, and examples after a definition with no colon (Duden) start their own line. The bilingual stylesheets separate spans by margin alone, soDictionaryMarkuprestores the word break before a translation or indicator. An example sits tight under its sense, the way the stylesheets spaceexg. Unknown markup reads as plain text in the nearest block, so a format change degrades rather than drops words. A record built from the plain Dictionary Development Kit template has no classes at all, so itsh1is the headword and eachpa paragraph.DictionaryTestsholds real records from each schema as its fixtures. - Dictionary is the default scope, and it is the lookup that always was. The header's selector
(⌘P) switches to Thesaurus, which asks only the enabled dictionaries whose
CFBundleNamenames a thesaurus (no Info.plist key marks one) and skips the public plain-text fallback, which reads every dictionary. The selector shows only while a thesaurus is enabled in Dictionary.app, re-read each time the screen opens. The scope lives onDictionarySessionuntil quit, never on disk. - Lookups run off the main actor. A long entry (
run,take) is a few hundred blocks, soDictionarySessiondebounces the query and looks it up detached, the wayFileSearchSessiondoes. The previous page stays up until the next resolves, and ↵ and ⌘K act on that page (what is shown is what is copied), so neither the page nor the footer flickers while typing.
| Key | Does |
|---|---|
| ↵ | Copy Definition: the whole entry, one line per block, then the palette closes |
| ⌘↵ | Open in Dictionary: dict://<term>, for every other enabled dictionary |
The first enabled dictionary that knows the term answers, in Dictionary.app's own order, unless the header's selector (⌘P) is set to Thesaurus. A term none of them knows reads "No definition found".