<!--
* t
****************************************************************************
- * Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_mouse.3x,v 1.45 2017/05/06 17:29:26 tom Exp @
+ * @Id: curs_mouse.3x,v 1.51 2019/07/13 23:45:12 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
-<meta name="generator" content="Manpage converted by man2html - see http://invisible-island.net/scripts/readme.html#others_scripts">
+<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
<TITLE>curs_mouse 3x</TITLE>
-<link rev=made href="mailto:bug-ncurses@gnu.org">
+<link rel="author" href="mailto:bug-ncurses@gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
SVr4 curses had support for the mouse in a variant of <STRONG>xterm</STRONG>. It is
mentioned in a few places, but with no supporting documentation:
- <STRONG>o</STRONG> the libcurses manual page lists functions for this feature which
+ <STRONG>o</STRONG> the "libcurses" manual page lists functions for this feature which
are prototyped in <STRONG>curses.h</STRONG>:
- extern int mouse_set(long int);
- extern int mouse_on(long int);
- extern int mouse_off(long int);
- extern int request_mouse_pos(void);
- extern int map_button(unsigned long);
- extern void wmouse_position(WINDOW *, int *, int *);
- extern unsigned long getmouse(void), getbmap(void);
+ extern int mouse_set(long int);
+ extern int mouse_on(long int);
+ extern int mouse_off(long int);
+ extern int request_mouse_pos(void);
+ extern int map_button(unsigned long);
+ extern void wmouse_position(WINDOW *, int *, int *);
+ extern unsigned long getmouse(void), getbmap(void);
- <STRONG>o</STRONG> the terminfo manual page lists capabilities for the feature
+ <STRONG>o</STRONG> the "terminfo" manual page lists capabilities for the feature
- buttons btns BT Number of buttons on the mouse
- get_mouse getm Gm Curses should get button events
- key_mouse kmous Km 0631, Mouse event has occured
- mouse_info minfo Mi Mouse status information
- req_mouse_pos reqmp RQ Request mouse position report
+ buttons btns BT Number of buttons on the mouse
+ get_mouse getm Gm Curses should get button events
+ key_mouse kmous Km 0631, Mouse event has occurred
+ mouse_info minfo Mi Mouse status information
+ req_mouse_pos reqmp RQ Request mouse position report
<STRONG>o</STRONG> the interface made assumptions (as does ncurses) about the escape
sequences sent to and received from the terminal.
\E[?1000%?%p1%{1}%=%th%el%;
+ The mouse driver also recognizes a newer xterm private mode 1006, e.g.,
+
+ \E[?1006;1000%?%p1%{1}%=%th%el%;
+
The <EM>z</EM> member in the event structure is not presently used. It is in-
tended for use with touch screens (which may be pressure-sensitive) or
with 3D-mice/trackballs/power gloves.
Because there are no standard terminal responses that would serve to
identify terminals which support the xterm mouse protocol, <STRONG>ncurses</STRONG> as-
- sumes that if your $TERM environment variable contains "xterm", or
- <STRONG>kmous</STRONG> is defined in the terminal description, then the terminal may
- send mouse events.
+ sumes that if <STRONG>kmous</STRONG> is defined in the terminal description, or if the
+ terminal description's primary name or aliases contain the string
+ "xterm", then the terminal may send mouse events. The <STRONG>kmous</STRONG> capability
+ is checked first, allowing the use of newer xterm mouse protocols such
+ as xterm's private mode 1006.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>