Skip to content

Commit

Permalink
Document timing of click chains
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Dec 11, 2024
1 parent fd6faf6 commit 9bb949f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/events/click.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

## Double & triple clicks

The `chain` attribute on the `Click` event can be used to determine the number of clicks that occurred in quick succession. A value of `1` indicates a single click, `2` indicates a double click, and so on.
The `chain` attribute on the `Click` event can be used to determine the number of clicks that occurred in quick succession.
A value of `1` indicates a single click, `2` indicates a double click, and so on.

By default, clicks must occur within 500ms of each other for them to be considered a chain.
You can change this value by setting the `CLICK_CHAIN_TIME_THRESHOLD` class variable on your `App` subclass.

See [MouseEvent][textual.events.MouseEvent] for the list of properties and methods on the parent class.

Expand Down

0 comments on commit 9bb949f

Please sign in to comment.