Mouse Support for X Terminals

The Terminal Manager allows for limited mouse support for X terminals if you are using a curses-compatible mouse. To make mouse events available to your COBOL program, you need to do the following to your termcap file:

Currently, the support is limited. In particular, the termcap file will return information about which button was pressed, and where the mouse was at the time the button was pressed. Though it will return information when a button was released, it cannot tell which button was released. The runtime system assumes that the button last pressed is the button released. This assumption may, of course, be incorrect. Double-clicks and information about motion are never returned.

The a_termcap entry for xterm-mouse is:

xterm-mouse|xterm emulator with mouse support (X window system):\
:cr=^M:do=^J:nl=^J:bl=^G:le=^H:ho=\E[H:\
:co#80:li#56:cl=\E[H\E[2J:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\
:ce=\E[K:cd=\E[J:UL=\E[4m:DL:\
:HI=\E[1m:RV=\E[7m:LO=\E[m:\
:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
:k1=\E[11:k2=\E[12:k3=\E[13:k4=\E[14:\
:k5=\E[15:k6=\E[17:k7=\E[18:k8=\E[19:\
:k9=\E[20:k0=\E[21:ta=^I:pt:sf=\n:sr=\EM:\
:al=\E[L:dl=\E[M:ic=\E[@:dc=\E[P:\
:kh=\EO\000:kN=\E[6:kP=\E[5:\
:km=\E[M:\
:w8=\E[?3l:w3=\E[?3h: \
:ks=\E[?1h\E=:ke=\E[?1l\E>:\
:is=\E7\E[?47h\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[?1h\E=\E[?1000h:\
:DI=\E[2J\E[?47l\E8\E[?1000l:\
:DI=\E[2J\E[?47l\E8:NS:\
:KX=\177:KI=\E[2:\
:GO=\E(0:GF=\E(B:GM=qxlkmjvtwun:\
:W8=\E[?3l:W3=\E[?3h:\
:hs:ts=\E[?E\E[?%i%dT:fs=\E[?F:es:ds=\E[?E: