python curses constant names for mouse wheel movements?
Alan Gauld
alan.gauld at yahoo.co.uk
Sun Mar 7 19:21:02 EST 2021
On 07/03/2021 07:16, pjfarley3 at earthlink.net wrote:
> Where can I find any documentation of the correct curses constant name(s) to
> use for detecting a "wheel down" action? Or do I just have to manually
> define my own BUTTON5 constant name for the wheel-down event?
I suspect you need to look in the ncurses documentation or
even the C code. And that is no guarantee that the Python
curses module will expose any values you do find other
than as numeric codes.
I would have expected the mouse wheel down/click to appear as
a BUTTON2 event to be honest. I didn't even realize there was
a BUTTON4 event defined let alone BUTTON5.
Incidentally, when you talk about wheel up/down are you
talking about wheel rotation events rather than actual
button down/up events? In that case 4 and 5 might make sense.
If you find the answer please post back, I'm very interested
since I'm in the middle of writing a book on the Python curses
module and was unaware of this behaviour. A whole new area
to explore.... I'm also interested in any documentation you
have already found on it - where did you get this understanding?
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Python-list
mailing list