0

Title pretty much says it all: I'm wondering whether it's possible to change the mouse cursor icon in response to feedback in a terminal app (e.g., a click event) from the ncurses library or another library?

For example: I am running xterm under X, and a curses application inside that xterm. I may or may not be sshed into another box.

A user clicks on an element of my cursor app -- is it possible to change the mouse cursor icon from a bar to a plus sign in response to the click?

There is some information here but I'd like a more complete resource:

Mouse movement events in NCurses

Community
  • 1
  • 1
  • You should start a new thread. – Maresh Apr 01 '13 at 19:14
  • What do you mean by "mouse icon" in the context of a Terminal? – Dogbert Apr 01 '13 at 19:17
  • 1
    Not a terminal exclusively (not a vt), but rather at terminal running in a windowed environment. Some applications (e.g., tmux) provide limited mouse support when running in a window environment, I'm wondering how that's done and what are the limits of the functionality. –  Apr 01 '13 at 19:19

1 Answers1

1

I don't believe it is. ncurses can read events from the mouse but not actually change mouse cursor settings. The terminal sends mouse movement and clicks to the ncurses program as escape sequences.

Some terminals, such as putty, will change the cursor to an arrow when a region is clickable. Otherwise, a text selection cursor is shown. But I don't think this is controllable through escape sequences.

craig65535
  • 3,439
  • 1
  • 23
  • 49