I want to detect mouse movement events with python-curses. I don't know how to enable these events. I tried to enable all mouse-events as follows:
stdscr = curses.initscr()
curses.mousemask(curses.REPORT_MOUSE_POSITION | curses.ALL_MOUSE_EVENTS)
while True:
c = stdscr.getch()
if c == curses.KEY_MOUSE:
id, x, y, z, bstate = curses.getmouse()
stdscr.addstr(curses.LINES-2, 0, "x: " + str(x))
stdscr.addstr(curses.LINES-1, 0, "y: " + str(y))
stdscr.refresh()
if c == ord('q'):
break
curses.endwin()
I only get mouse-events when a mouse-button is clicked, pushed-down, etc but no mouse move events. How do I enable these events?