[[tui-events-mouse]]
= Mouse Handling
:page-section-summary-toc: 1

ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]

You can subscribe to all mouse events:

[source, java, indent=0]
----
include::{snippets}/MouseHandlingSnippets.java[tag=sample]
----

`MouseEvent` is a record wrapping _X_ and _Y_ coordinates and
`org.jline.terminal.MouseEvent` from JLine library.
