multiple devices, and *x*, *y*, *z* are the event's coordinates. (*z* is
currently unused.) *bstate* is an integer value whose bits will be set to
indicate the type of event, and will be the bitwise OR of one or more of the
- following constants, where *n* is the button number from 1 to 4:
+ following constants, where *n* is the button number from 1 to 5:
:const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:`BUTTONn_CLICKED`,
:const:`BUTTONn_DOUBLE_CLICKED`, :const:`BUTTONn_TRIPLE_CLICKED`,
:const:`BUTTON_SHIFT`, :const:`BUTTON_CTRL`, :const:`BUTTON_ALT`.
+ .. versionchanged:: 3.10
+ The ``BUTTON5_*`` constants are now exposed if they are provided by the
+ underlying curses library.
+
.. function:: getsyx()
support is provided by the underlying ncurses library.
(Contributed by Jeffrey Kintscher and Hans Petter Jansson in :issue:`36982`.)
+The ``BUTTON5_*`` constants are now exposed in the :mod:`curses` module if
+they are provided by the underlying curses library.
+(Contributed by Zackery Spytz in :issue:`39273`.)
+
distutils
---------
--- /dev/null
+The ``BUTTON5_*`` constants are now exposed in the :mod:`curses` module if
+available.
SetDictInt("BUTTON4_DOUBLE_CLICKED", BUTTON4_DOUBLE_CLICKED);
SetDictInt("BUTTON4_TRIPLE_CLICKED", BUTTON4_TRIPLE_CLICKED);
+#if NCURSES_MOUSE_VERSION > 1
+ SetDictInt("BUTTON5_PRESSED", BUTTON5_PRESSED);
+ SetDictInt("BUTTON5_RELEASED", BUTTON5_RELEASED);
+ SetDictInt("BUTTON5_CLICKED", BUTTON5_CLICKED);
+ SetDictInt("BUTTON5_DOUBLE_CLICKED", BUTTON5_DOUBLE_CLICKED);
+ SetDictInt("BUTTON5_TRIPLE_CLICKED", BUTTON5_TRIPLE_CLICKED);
+#endif
+
SetDictInt("BUTTON_SHIFT", BUTTON_SHIFT);
SetDictInt("BUTTON_CTRL", BUTTON_CTRL);
SetDictInt("BUTTON_ALT", BUTTON_ALT);