Using the mouse in the terminal

There should be mouse support for the terminal

I’m trying to develop a painting app for the terminal, but the app isn’t picking up any mouse events from replit.

There is, in python/c++/c, use curses

2 Likes

or urwid although I don’t think it tracks movement, only clicks
Of course that’s only if the replit terminal sends mouse information to the code for it to handle

3 Likes

oh yeah I use curses most of the times :smiley:

2 Likes

Yeah, the terminal already supports mouse events. See this Repl by @bigminiboss:

https://replit.com/@bigminiboss/Curses-Wrapper-for-Ascii-Games?v=1

You can click and it will show you the event details.

2 Likes