如何在 Linux 上注册/捕获终端内鼠标点击的位置?
How to register / capture location of mouse click inside of terminal on Linux?
我想知道如何使用 C/C++ 在 Linux 中捕获终端 window 内鼠标点击的位置?
在xterm
中,有escape sequences to enable mouse tracking。
但它说:
The motion reporting modes are strictly xterm extensions, and are not
part of any standard
并非所有终端都实现了这样的功能,但据我所知,在那些实现了这些功能的终端中,所有终端都使用了 xterm
转义序列。
但 use ncurses to capture mouse clicks.
可能更容易
我想知道如何使用 C/C++ 在 Linux 中捕获终端 window 内鼠标点击的位置?
在xterm
中,有escape sequences to enable mouse tracking。
但它说:
The motion reporting modes are strictly xterm extensions, and are not part of any standard
并非所有终端都实现了这样的功能,但据我所知,在那些实现了这些功能的终端中,所有终端都使用了 xterm
转义序列。
但 use ncurses to capture mouse clicks.