# HumanType

HumanType simulates typing and corrections in desktop Microsoft Word. It runs locally on Windows x64; the portable release includes its .NET runtime. Microsoft Word must be installed and activated.

## Start a simulation

1. Extract the portable ZIP and run **HumanType.exe**. Keep any accompanying files together.
2. Choose **Import document…**, or paste text and choose **Use pasted text**.
3. Review the source preview and conversion notices. **Preview layout** opens a PDF of the converted source.
4. Choose **Separate working document**, or open a destination in Word, position its cursor, select **Insert into an open document**, and click **Refresh**.
5. Click **Capture destination**, set your speed and amendments, then click **Start typing**.

You can use other applications while typing continues. The dedicated Word window starts hidden; **Show Word** makes it visible. Background typing requires an awake, signed-in Windows session and a responsive Word application. It is document automation rather than system-wide keystroke injection.

Existing-document insertion uses the start of the current selection and preserves its text. Choose a location in the main body, outside a table. Source content is inserted in separate sections. The app saves a backup of the destination before inserting anything. Turn off Word Track Changes first.

## Speed and revisions

- **Static WPM:** constant scheduled character timing. At 60 WPM, the interval is 200 milliseconds per character.
- **Average + variation:** chooses a speed around the average for each word. At 60 WPM and 20% variation, speeds range from 48 to 72 WPM.
- **Minimum / maximum:** chooses a word speed within the two bounds.
- **Thinking pauses:** adds short pauses after sentence punctuation and paragraph-like text breaks. Revisions and object pauses also add to total duration.
- **Amendments per 100 words:** controls the approximate frequency of temporary corrections. Set zero to disable amendments. Very short documents can have no amendments at low rates.
- **Edit depth:** character, word, sentence, or paragraph. Edits remain within an editable formatting span; mixed-format paragraphs can therefore receive shorter revisions.
- **Lookback:** bounds how far back corrections can occur, or permits anywhere already typed.
- **Random seed:** repeating the same source and settings produces the same planned actions.

Changes to settings apply when starting a new simulation. Actual throughput can be lower than the configured speed when Word is busy or automation work takes longer than an interval; the app avoids catch-up bursts.

Objects appear when their document block or anchor is reached. Tables appear with their structure and fill cell by cell; images appear as complete objects. Word creates note labels automatically. Fields, equations, revision markup, and protected/complex content may be copied intact, with preflight notices.

## Pause, recover, and export

**Pause** saves a checkpoint and keeps the working document available. **Resume** continues the same session. **Stop** preserves the partial result and also permits later resumption. Pause before exporting.

**Export…** saves a snapshot without changing the active Word document's file name or format. In existing-document mode, the export contains the entire destination document, including its surrounding content. A partial export can contain hidden placeholders for content that has not been typed yet; these are removed as the simulation progresses.

Recovery snapshots are saved every 30 seconds and on pause, stop, and completion. **Session folder** opens the current session directory. By default it is under:

`%LOCALAPPDATA%\HumanType\Sessions`

After reopening HumanType, choose **Recover…**, open that session's `checkpoint.json`, and click **Resume**. Recovery opens a separate working copy of the snapshot, including the whole destination when an existing document was used. Modified snapshots or source files are rejected to prevent replay into mismatched text. Keep the session directory together; it contains the source, document plan, and checkpoint.

If generated content or its anchors are edited externally, the app pauses. Restore a matching checkpoint or start a new session. A Word dialog can temporarily block automation; close it before recovering from an error. **New session** and closing the app preserve snapshots and close only Word instances owned by HumanType.

If a Word operation fails, HumanType preserves the last confirmed checkpoint and enables **Recover session**. It saves an initial checkpoint before typing, so even a first-object error has a restart point. Resume is disabled after such an error because Word may have applied only part of the operation. Choose **Session folder**, find `checkpoint.json`, then select that file using **Recover session**. Diagnostics are recorded in `error.log` in that folder. Recovery can lose up to the last 30 seconds of work after an unexpected failure; it continues from the saved snapshot. Close any blocking Word dialog first. If the connection to Word was lost, recovery opens a fresh dedicated instance.

## Supported formats and fidelity

Import: **DOCX, DOC, RTF, ODT, TXT, MD/Markdown, HTML/HTM, and text-based PDF**.

Export: **DOCX, DOC, RTF, ODT, TXT, Markdown, HTML, and PDF**.

DOCX gives the best preservation. The fidelity baseline is the converted DOCX, rather than the original PDF or legacy-format page layout. PDF import uses a local extractor to retain readable paragraphs, page sizes, basic fonts, and decodable images; tables and vector artwork may be simplified. PDF import needs extractable text; OCR is not included. Fonts must be installed for the same rendering. Unsupported arbitrary binary files are rejected.

TXT keeps text only. Markdown preserves a subset of headings, lists, emphasis, and links; complex layout is simplified. HTML can produce a companion folder for images. DOC, RTF, and ODT may simplify modern Word features. PDF preserves the rendered result.

Completion checks source text, core character formatting, and supported object/layout properties. **Needs review** means a discrepancy was detected; the result is retained for inspection rather than replaced with the source. Conversion and unusual Word features cannot guarantee pixel-identical output for every document.

## Source and building

The `source` folder contains the application, Word adapter, simulation engine, and acceptance tests. See `source/README.md` for build and test commands.

## Windows Smart App Control

The portable release is unsigned. Windows 11 Smart App Control can block it because it cannot verify the publisher. Microsoft does not provide an allow-once exception for an individual app. To create a release Smart App Control can verify, the publisher must obtain a code-signing certificate from a provider trusted by Microsoft and install it in the Windows certificate store. Then run `Sign-Release.ps1` with that certificate's thumbprint; the script signs the executable, verifies its signature, and only then creates a portable ZIP. A self-signed certificate does not establish a publisher trusted by Windows. See Microsoft's [Smart App Control FAQ](https://support.microsoft.com/en-us/windows/security/threat-malware-protection/smart-app-control-frequently-asked-questions) and [code-signing guidance](https://learn.microsoft.com/en-us/windows/apps/develop/smart-app-control/code-signing-for-smart-app-control).


## MORNE interface (v1.1)

The source workspace is on the left; typing and amendment settings are on the right. Choose a speed mode to reveal the fields for that mode. Expand Repeatability to change the random seed or object insertion pause.

Import a document or paste text and select Use pasted text. Review the preflight summary, choose the Word destination, and select Capture destination. Start typing becomes available after capture. Existing Word document selection and Refresh appear when you choose Insert into an open document.

Session controls and live WPM, elapsed time, estimated time remaining, amendment count and source progress are at the bottom. On smaller windows, scroll the source or settings pane to reach every control. Closing the app preserves the partial result through the existing session recovery behavior.

The HumanType window has a strongly rounded transparent silhouette and can be resized from its edges. Drag the title bar to move the window. Minimize and close controls are in the title bar; maximize is omitted.

## First-pass mistakes, thinking pauses, and remembered settings (1.1.8)

For new sessions, Amendments controls the rate of mistakes introduced while typing. Each correction fixes an erroneous passage that was entered on its first pass. Set frequency to zero for accurate typing. Correction depth controls how much of the erroneous passage is retyped, within its formatting run. Long depths can limit event frequency.

Enable **Pause for thinking** and choose the chance at each sentence/paragraph boundary, plus minimum and maximum seconds. For example, 25%, 2-6 seconds pauses at about one quarter of eligible boundaries. 100% pauses at every eligible boundary; 0% disables automatic thinking. Typing resumes automatically; Pause/Stop remain available during thinking. This works at every WPM mode.

Valid settings save automatically and reload next time. Invalid or unfinished numbers do not replace the last valid settings. Recovery uses the saved session settings; the settings shown in the UI are updated to match. Older sessions keep their original operation sequence; start a new session for first-pass mistake behavior.

## Destinations, selective editing and shortcuts (1.2.0)

The output menu now offers Google Docs, background text files/compatible fields, and foreground keyboard input alongside Word. These additional destinations output basic text; Word preserves rich document layout. For Google background setup, see GOOGLE-DOCS-SETUP.md. To type at a cursor, select a field/keyboard mode, position the cursor in the receiving app, and press Ctrl+Alt+C. Ctrl+Alt+S starts/resumes; Ctrl+Alt+P pauses; Ctrl+Alt+X stops. F1 shows all shortcuts. Keyboard mode keeps the field focused and disables amendments; paragraph breaks are opt-in for document editors.

Compare documents lets you load the old and new versions, select revisions, and save a revised DOCX copy. Both source files remain unchanged. Select all applies all detected changes; select none retains the old version; individual checks apply those edits. Use result as typing source loads the saved output. The selective edit is immediate; typing that saved source uses the normal simulation.

Maximize/restore is available in the title bar. Double-click the title bar to toggle. Drag down while maximized to restore the normal window and move it. Text-file and Google checkpoints use text-checkpoint.json. For field recovery, recapture the original field and its full text is validated. Keyboard sessions keep partial-text.txt for manual continuation after restart.
