xterm: set mouse pointer type for ncurses

Thomas Dickey dickey at his.com
Mon May 22 08:49:28 UTC 2017

On Mon, May 22, 2017 at 09:29:33AM +0200, Ralf Mattes wrote:
> Am Montag, 22. Mai 2017 03:07 CEST, Thomas Dickey <dickey at his.com> schrieb:
> > On Mon, May 22, 2017 at 12:01:43AM +0200, Tobias Girstmair wrote:
> > > Hi, I'm new here.
> > >
> > > I am trying to build a curses based program, and I'd like to know if
> > > there is an option to change the mouse cursor type.
> > >
> > > The default is the text selection cursor, but I need to use the
> > > 'normal' pointer style, if that makes sense to any of you.
> > >
> > > Is there a control sequence (or at least a command line parameter)
> > > for this available?
> >
> > man curs_set
> But this sets the _cursor_. The OP asked about the _mouse pointer_. IIRC ncurses
> doesn't deal with the X layer, it only operates at the terminal (emulation) layer.

agreed - that interface is all that ncurses provides.

The "mouse pointer" in _xterm_ may be set via an X resource (unless it's
using the cursor-theme stuff).  That's done via XDefineCursor().

       pointerShape (class Cursor)
               Specifies the name of the shape of the pointer.  The default is

Technically its color can be set using an escape sequence, but iirc the
required support in the X server has been broken for a long time (due to
some changes for acceleration).

By the way, being a "curses" question, it should have been directed to
bug-ncurses (xorg won't provide any useful insight).

Thomas E. Dickey <dickey at invisible-island.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.x.org/archives/xorg/attachments/20170522/dde5afcf/attachment.sig>

More information about the xorg mailing list