Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Windows 上,您可以使用和分别从在终端(或命令提示符)中运行的应用程序获取鼠标位置GetCursorPos(),甚至可以分别模拟鼠标单击和移动。这些函数可以在 中找到。mouse_event()SetCursorPos()windows.h
GetCursorPos()
mouse_event()
SetCursorPos()
windows.h
我在 Terminal.app 的 Mac OS X 下寻找相同的功能。这是否可能,如果可以,是否可以在没有库的情况下完成?如果没有,是否有可能在另一个终端或根本没有?
是的,您可以使用ncurses图书馆。请参阅此手册页。
ncurses