Writing on the page
The script editor's page view was read-only: US Letter in Courier 12 at the industry's indents, but a click only took the Fountain text there, and the writing happened in that text, flush left, with marks a writer has to learn (the UX review of October 2026, finding 9: "Writing happens in raw Fountain"). Final Draft, Fade In, WriterDuet and Highland all write on the formatted page; a writer judges pace by the page as they type. This note says how Studio's page view becomes the place to write, and which rules it follows.
Read with docs/design/m5-writers-room.md (the script editor) and
engine/addons/reelwright/ui/script/rw_script_elements.gd (the elements, as written in the text).
What the other apps do
Measured from their manuals and help (Final Draft 13's user guide, Fade In 5's built-in help and templates, WriterDuet's help and its web app):
| Key | Final Draft | Fade In | WriterDuet |
|---|---|---|---|
| Enter at the end of an element | Heading → Action, Action → Action, Character → Dialogue, Parenthetical → Dialogue, Dialogue → Action, Transition → Heading | the same | the same |
| Enter on an empty element | opens an element menu | an element menu, when set | empty Character → Action, otherwise a menu |
| Enter in the middle | splits the paragraph | splits | splits |
| Tab on an empty line | Action → Character → Transition → Heading | Action ↔ Character | Action → Character → Transition → Heading |
| Tab in dialogue | Dialogue ↔ Parenthetical | the same | the same |
| Backspace at an element's start | joins it to the one before | keeps elements apart | an empty line before goes; else joins, the one before keeps its element |
| Capitals (heading, character, transition) | a style of the element | a style | a style |
| A parenthetical's brackets | written for you | written for you | written for you |
| Home, End | the line's start and end | — | the element's |
| Current element | a menu in the toolbar, the status bar; Ctrl+1–7 | Format menu; Ctrl+1–7 | Line Types; Ctrl+1–7 |
| Copy and paste | keeps elements inside the app | Copy and Paste as Fountain | with formatting, or plain |
| Completion | SmartType: names, extensions, INT./EXT., times, transitions | names, INT./EXT. | names, headings |
Where they agree, Studio does the same. Where they differ, it takes the rule that keeps the Fountain file as a writer would write it by hand.
The rules Studio follows
The file stays Fountain and stays the truth: the page view edits it, and Undo, the director's reading, notes, revisions, drafts kept for later and the export all work on that text as before.
- Enter at the end of an element: Heading → Action, Action → Action, Character → Dialogue, Parenthetical → Dialogue, Dialogue → Action, Transition → Heading, as in all three. The blank lines Fountain needs between elements are written for the writer and never shown.
- Enter on an empty element: it goes back to Action (WriterDuet's rule for a character, made general), and with a blank line above it already, Enter adds no other: a writer who presses Enter twice between paragraphs, as a script is typed by hand, gets one blank line (the third product audit's typed script had its blank lines doubled). Studio has no element pop-up; the element menu in the bar is always there.
- Enter in the middle of an element: action splits into two paragraphs, as Final Draft does; in dialogue, a parenthetical or a heading it is a new line of the same element. Shift+Enter is always a new line inside the element.
- Tab on an empty line: Action → Character → Transition → Heading → Action; Shift+Tab goes the other way. On an empty line under a character or their line, Tab makes a parenthetical, and Tab in an empty parenthetical goes back to dialogue. Tab at the end of a line of dialogue opens a parenthetical under it. Tab at the end of a short line of action, alone in its paragraph, makes it that character (the name typed before the Tab). Tab never types a tab and never leaves the script.
- Backspace at an element's start joins it to the end of the element before, which keeps its element (WriterDuet), in one key: the blank lines between them go with it. On a new empty element, Backspace takes it away and the caret goes back to the end of the one before. Delete at an element's end joins the next one to it.
- Capitals: a heading, a name and a transition chosen for the line (with Tab, Enter or the element menu) are written in capitals as they are typed. Fountain reads a character by its capitals, so there they are the text itself, not a style. Nothing else typed is re-cased: a line is never put in capitals because its first letters looked like a name (the third product audit's "June drops into the chair…" came out in capitals from its J). A short name alone on its line (at most four words, no sentence's punctuation) is still a character waiting for their line, so Enter after it starts their dialogue; a longer line in capitals is action. A line typed under a name that opens with a bracket is their parenthetical.
- Brackets: a parenthetical's brackets are written for the writer, as in all three.
- The caret: Left and Right step over Fountain's own marks (a forced
!,.,@or>, emphasis's*and_) as if they were not there; at an element's end Right goes to the next element's start. Up and Down go to the row above or below and keep the caret's place across the page, whatever the indents. Home and End go to the start and end of the row; Ctrl+Home and Ctrl+End to the script's. Page Up and Page Down go a screen. A click puts the caret at the nearest letter; a click in the margin left of an indented element puts it at its start. A double-click takes the word, Shift+click and a drag select. - Selection, copy and paste: a selection runs across elements. Copy and Cut give the Fountain text, which any other app reads (Fade In's Copy as Fountain). Paste puts plain text in as Fountain: what reads as a heading or a cue becomes one.
- Completion: names, places, extensions and a heading's openings are offered under the caret as they are typed, as SmartType does; Enter or Tab takes one, Esc lets it go.
- The current element is in the bar's element menu, which also changes it. Ctrl+1 to Ctrl+7 are Studio's places (the rail), so the elements have no number keys.
- The source stays one choice away: View › Source (and Source in the bar) shows the Fountain text with its line numbers and colours, and both edit the same file.
Keys between the panes
Tab never leaves the script, so the keyboard needs another way out: F6 (or Ctrl+Tab) goes from the script to the director's reading to the bar and back; Shift+F6 (or Ctrl+Shift+Tab) goes the other way. In a browser, which keeps F6 and Ctrl+Tab, it is Ctrl+Shift+. and Ctrl+Shift+,. Both are in the one key map ("script.next_pane", "script.previous_pane"), so the Keyboard page, the shortcut sheet and the menus say them.
How it is built
The Fountain text box stays in the editor and keeps the keyboard: typing, Undo, the clipboard, find, completion and the element keys all happen there as before. On the page it is drawn invisible, under the page view, and the page view draws what it holds: the caret, the selection, the spelling's wavy lines, find's matches and the completion list, each where its letters print.
- The page map (
RwScriptPageMap) lays the text out on pages withRwScriptPagesand keeps, for each printed row, the source line it prints and the source column of each letter, found by matching the printed letters to the line's (case aside, Fountain's marks skipped). From it come the caret's place on the page, a click's place in the text, and the moves above. - An element still being written has no letters yet, so Fountain would print nothing there. The map lays it out with an invisible letter of that element in its place, so the empty element sits where its first letter will, at its indent; a name being typed sits at the character's indent before its line of dialogue exists.
- A keystroke lays out only what it touched, as a word processor does: the lines that changed, widened to the paragraphs round them (an element is read by the blank lines about it), are read again on their own; their elements are made into rows again; and the pages are paginated again from the last one that starts with a whole element two elements before them (a heading goes where the paragraph under it lets it), until a page starts with the same element it did before. The pages after it are kept, moved by the lines and pages the change added. The whole script is laid out when it is opened, and where a stretch cannot be read on its own: a title page, a note or boneyard, dual dialogue, a paste of hundreds of lines. Laid out whole, a 141-page script takes a few hundred milliseconds; a letter typed on its page 60 reads one element again and paginates one page.
- Nothing after the change is made again. The rows of an element share how far its lines have moved, so a line put in moves everything after it element by element, not row by row, and a row printed before keeps its place in the map (the letters' columns are not matched again). A line put in usually pushes every page break after it on, which would paginate the rest of the script: a keystroke paginates at most four pages, those in sight, and the pages after follow a moment later, twenty at a time. Until then the pages after them are as they were; the next change, or the caret going there, paginates the rest first.
- The editor reads the text once a keystroke, and only where it changed. It keeps the text box's lines from the text box's own edits; the caret's element, the spelling and the names offered read the page map's reading. The script's own names (for completion) are read again when a name or heading changes, but not at each letter of the one being typed: it counts once the caret leaves it.
- Measured (
rw_script_page_writing_test.gd, on page 60 of 141, keys pressed as a person does): the editor's whole work for a letter is about 3 ms and for an Enter about 6 ms on the box this was built on, busy with other work; the test fails when the quickest of seven passes 16 ms, a frame at 60 a second (a busy machine only adds time to a key, so the quickest is its cost; the middle one failed at load 50 on 24 cores). Before, a letter took 17.5 ms and an Enter's layout alone 28 ms.rw_script_page_map_test.gdlays out random edits incrementally and whole and compares the two, the pages still to follow included. - The page scrolls to keep the caret in sight.
Not in this step
Dual dialogue is drawn and its letters can be edited, but Up and Down treat its two columns as one row after the other. A parenthetical written over two lines of the file edits from its first line. A writer's input method's unfinished text is not drawn on the page (it is in the text box, and lands on the page when it is done).