I would like to know if there is any way to detect the mouse in C, such as when entering the terminal's quick edit mode.
I would like to know if there is any way to detect the mouse in C, such as when entering the terminal's quick edit mode.
You need to use a graphical library to detect the mouse position. You can not do the terminal. The Allegro graphics library, for example, does this. In fact, if you're on Windows, windows.h
itself has a function that does this, I believe it's GetCursorPos
. If you want to learn more about this windows.h
function, look at here on the Microsoft Developer Network (MSDN) website , and for an example, look at on this question from DaniWeb .