Commit Graph

1 Commits

Author SHA1 Message Date
alan 9b90806093 xterm: fix mouse wheel, drag, motion and middle-button reporting
- Wheel buttons were encoded as 68/69 (64 + 4/5, i.e. Shift + wheel down/
  wheel right); they are 64 up and 65 down.
- Wheel, click and drag positions use the view's own screen cell: the
  wheel used the window position, and clicks used the buffer row
  (counting scrollback) instead of the screen row. Default encoding sent
  the row one too high.
- A new TerminalMouseListener reports mouse presses, releases, drags
  (1002) and motion (1003, also without a button) from pointer events,
  with Ctrl/Alt modifiers. Before, a drag became a text selection and
  motion was never sent. Holding Shift at the press leaves the pointer to
  selection while the program owns the mouse.
- The middle button's press and release were reported as the right
  button. SGR releases name the released button.
- With mouse tracking on, the wheel is reported on the main screen too.
- TerminalController reports every pointer input kind by default; the
  program's mouse mode decides what is sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:36:32 +00:00