Note: This not really a ZTERM specific escape sequence. It's supported by the AM62x terminal emulators only and is used to turn on mouse positon reporting.
Parameter |
Value or Description |
Lead-in |
ESC ` M |
Mode |
0 = disable mouse reporting |
1 = enable mouse reporting |
|
? = report mouse position |
|
Mode 1 only |
C = row/column mode (only mode supported by ZTERM) |
count (see below) |
|
lead-in (see below) |
Mode 1
To make the differentiation of mouse clicks versus other characters, ZTERM can be programmed to send a special lead-in each time a mouse report is given as a result of a click. This could be an escape sequence that's then translated into a function key press by the host.
To setup the lead-in, send the count of characters for the lead-in, offset by 31. For example, to send a length of two, send a CHR$(33). Then send the lead-in string.
Reporting
When the user clicks or a report mouse position command is sent, ZTERM will respond in the following manner:
[lead-in if not a report command] |
[button if not a report command] |
row + 32 |
col + 32 |
If in 132 column mode and the column number is greater than 96, the following is sent:
[lead-in if not a report command] |
[button if not a report command] |
row + 32 |
CHR$(25) |
col - 96 |
The values for button are:
0 for any button going up |
1 for the right button going down |
2 for the left button going down |
3 for the middle or both buttons going down |
When a click occurs, you will receive two report messages. A down report and an up report. If a double click occurs, you'll receive an extra up report.
When mouse reporting is enabled, the screen copy selection will not function. To enable it temporarily, hold down the shift key.