diff options
author | Zackery Spytz <zspytz@gmail.com> | 2021-01-14 09:40:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 09:40:09 (GMT) |
commit | 14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9 (patch) | |
tree | d296971ebb25971ee313ef27e532d06f43f24686 /Modules/_cursesmodule.c | |
parent | a330365ca5ae836075f306334ab648bf23471481 (diff) | |
download | cpython-14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9.zip cpython-14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9.tar.gz cpython-14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9.tar.bz2 |
bpo-39273: Expose BUTTON5_* constants in the curses module if available (GH-17996)
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 7175c72..7ab68c7 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -4870,6 +4870,14 @@ PyInit__curses(void) 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); |