Skip to content

Mouse-Tracking Reading (MoTR) with Blurred Text

Measure per-word reading times without an eye tracker by blurring text except near the mouse pointer, and hold comprehension questions until the reading ends.

New in v2.15.0

The cursor_reveal scheme shows an item's text blurred except for the words near the mouse pointer. Readers move the pointer along each line to read the text, and Potato records the pointer's path with a timestamp and the word under the pointer at each sample. From the stored path, you can compute reading times per word, regressions to earlier words, and total reading time without an eye tracker in the lab. The scheme suits psycholinguistic reading studies run in a web browser, and comprehension questions can wait until the reader presses a button that ends the reading.

Eye tracking is the standard way to measure how long a reader looks at each word, and eye-tracking measures such as first-pass reading time and regressions usually need lab hardware. Wilcox, Ding, Sachan, and Jäger (2024) introduced mouse tracking for reading (MoTR) to measure incremental reading with a mouse instead. In MoTR, the text is blurred, only the region around the mouse pointer is sharp, and the pointer's path stands in for the reader's gaze. Potato's cursor_reveal scheme implements the MoTR display and stores the samples, and your analysis code computes the per-word measures from the samples.

Configuration

The config below shows each sentence blurred and asks one question after each sentence. label_requirement keeps the Next button blocked until Potato has stored a reading:

yaml
annotation_task_name: "Read with the mouse"
task_dir: .
data_files:
  - data/passages.jsonl
item_properties:
  id_key: id
  text_key: text
output_annotation_dir: annotation_output/
export_annotation_format: jsonl
user_config:
  allow_all_users: true
 
annotation_schemes:
  - annotation_type: cursor_reveal
    name: reading
    description: "Move the mouse pointer along the sentence to read it"
    radius: 40
    blur: 4
    label_requirement:
      required: true
 
  - annotation_type: radio
    name: comprehension
    description: "How well did you understand the sentence?"
    labels: ["Fully", "Partly", "Not at all"]

The scheme reads the item's text_key field, text here. Each line of data/passages.jsonl is one item:

json
{"id": "s1", "text": "The black cat slept quietly on the kitchen windowsill all afternoon."}

Options

cursor_reveal optionDefaultMeaning
namerequiredScheme name, also the key the reading is stored under
descriptionrequiredThe instruction shown above the text
source_fieldthe text_key fieldThe item field holding the text
radius40How far from the pointer, in pixels, words on the pointer's line stay sharp, from 5 to 400
blur4Blur of the other words, in pixels, from 0 to 40
sample_ms20Shortest interval between two recorded pointer samples, in milliseconds, from 5 to 1000
finish_buttonfalseEnds the reading with a button. true labels the button "I've finished reading", and a string of up to 80 characters sets the button's text
hide_after_finishtrueHides the text once the reader presses the finish button. The option needs finish_button
label_requirementnone{required: true} keeps the Next button blocked until a reading is stored

Potato checks the options when the server starts and stops with a message on a value outside the ranges above, or on hide_after_finish without finish_button.

Sharp words near the pointer

Potato splits the text into words at whitespace and shows the words as plain text. HTML markup in the item field is not rendered. Words on the pointer's line within radius pixels of the pointer are sharp, and the rest stay blurred. A sharp copy of the text anywhere on the page would let the reader skip the blur. When the scheme reads the main text field, the page therefore hides the usual sharp copy of the text above the annotation schemes. A scheme that reads another field through source_field leaves the main text on screen.

Without a finish button, Potato saves the reading when the pointer leaves the text, and before the page saves for any other reason, such as the Next button. On a return visit to an item, new samples are added to the stored samples, and the new timestamps continue after the last stored sample.

Mouse or trackpad required

The scheme needs a mouse or a trackpad. A touch screen has no hover, and on a phone or tablet the text stays blurred. Tell participants in the recruitment text that the study needs a computer with a mouse or trackpad.

Comprehension questions after the reading

A reader who sees a comprehension question early can read the passage for the answer, so reading studies often show the questions only once the passage has been read. With finish_button, a button under the text ends the reading. When the reader presses the button, Potato stores the reading, recording stops, and the text is hidden unless hide_after_finish is false. Potato stores no reading before the press. A question gated by display_logic on the reading scheme with the not_empty operator therefore stays hidden until the button press.

When every item has a separate question, keep the question text in an item field and give the field the same rule in instance_display. The config below shows the question field and the answer scheme together once the reader has finished:

yaml
annotation_task_name: "Mouse-tracking reading with comprehension questions"
task_dir: .
data_files:
  - data/passages.jsonl
item_properties:
  id_key: id
  text_key: text
output_annotation_dir: annotation_output/
export_annotation_format: jsonl
user_config:
  allow_all_users: true
 
instance_display:
  fields:
    - key: question
      type: text
      label: "Question"
      display_logic:
        show_when:
          - {schema: reading, operator: not_empty}
 
annotation_schemes:
  - annotation_type: cursor_reveal
    name: reading
    description: "Move the mouse pointer along the text to read it, then press the button."
    radius: 40
    blur: 4
    sample_ms: 20
    finish_button: "I've finished reading"
    label_requirement:
      required: true
 
  - annotation_type: radio
    name: comprehension
    description: "Answer the question about the passage."
    labels: ["Yes", "No"]
    display_logic:
      show_when:
        - {schema: reading, operator: not_empty}
    label_requirement:
      required: true

Each item has the passage and the passage's question:

json
{"id": "p01", "text": "The council met on Tuesday evening, and after two hours of debate the vote on the new bus route was postponed until spring.", "question": "Was the vote on the bus route held on Tuesday?"}

The instance_display block lists only the question field, and the passage appears only inside the cursor_reveal scheme, blurred. Potato sends the question field hidden and shows the question only after checking the rule. Even so, the question text is in the page source, and a reader who opens the HTML can find the question there. Showing a Field After an Answer covers the field rule in full.

Three more behaviors of the button matter when you plan a study:

  • Early press. When the reader presses the button before the pointer has crossed the text, Potato asks the reader to read the text first.
  • Returning to a finished item. A finished item shows the question when the reader comes back, the text stays hidden, and Potato adds nothing to the stored reading.
  • Leaving without pressing. Potato does not store a reading the reader left before pressing the button. The server also rejects a saved reading without "finished": true on a scheme with a finish button.

Stored value

Potato stores each reading as one JSON string under the scheme name, with reading as the label key whatever the scheme is called:

json
{"reading": {"reading": "{\"words\": [\"The\", \"black\", \"cat\"], \"samples\": [[0, 0.02, 0.4, 0], [20, 0.05, 0.4, 0], [40, 0.11, 0.4, 1]], \"dwell\": [40, 20, 0]}"}}

The JSON string has up to four keys:

  • words lists the text's words in order.
  • samples lists one [t, x, y, word] entry per sample. t is milliseconds since the text was shown, x and y are the pointer's position as fractions of the text box, and word is the index of the word under the pointer, or -1 when no word is under the pointer.
  • dwell gives the total time, in milliseconds, that the pointer spent on each word.
  • finished is true once the reader has pressed the finish button, and appears only on a scheme with finish_button.

From samples, analysis code computes first-pass reading time, regressions (a later sample on an earlier word), and total reading time per word, as eye-tracking studies do with fixations. The server rejects samples out of time order, samples outside the text box, and samples naming a word the text does not have, and accepts at most 50,000 samples per item. At the default sample_ms of 20, 50,000 samples cover more than 16 minutes of pointer movement on one item. Annotations persist to annotation_output/<user>/user_state.json whatever the export format, and the jsonl export writes the reading as the same JSON string.

Example

Potato's release includes a two-sentence mouse-tracking example. Start the example from the root of a Potato checkout:

bash
potato start examples/advanced/mouse-tracking-reading/config.yaml -p 8000

The example asks how well the reader understood each sentence, with no finish button. Add finish_button and the display_logic rule from the config above to hold the question until the reading ends, then point data_files at your own passages.

Further reading

For implementation details, see the source documentation.

References

  • Wilcox, E. G., Ding, C., Sachan, M., and Jäger, L. A. (2024). Mouse Tracking for Reading (MoTR): A new naturalistic incremental processing measurement tool. Journal of Memory and Language, 138, 104534. https://doi.org/10.1016/j.jml.2024.104534