[[tui-views-menu]]
= MenuView
:page-section-summary-toc: 1

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

_MenuView_ is a base implementation providing functionality to draw a menu.
_MenuView_ inherits from xref:tui/views/box.adoc[].

== Default Bindings
Default _key bindings_ are:

.Key
|===
|Command |Description

|CursorUp
|Move selection up

|CursorDown
|Move selection down

|Enter
|Choose active item.

|===

Default _mouse bindings_ are:

.Mouse
|===
|Command |Description

|Wheel \| WheelUp
|Move selection up

|Wheel \| WheelDown
|Move selection down

|Released \| Button1
|Choose item

|===

== Events

Events are sent depending on a used list type.

.ListView Events
|===
|Event |Description

|MenuViewOpenSelectedItemEvent
|Active item is requested to get opened.

|MenuViewSelectedItemChangedEvent
|Active item is changed.

|===
