keyboard (UNIX) - add highlight tracking SpecialSequence
Original Reporter info from Mantis: dannym
-
Reporter name: Danny Milosavljevic
Original Reporter info from Mantis: dannym
- Reporter name: Danny Milosavljevic
Description:
Attached is a patch to add a SpecialSequence translation for xterm mouse highlight tracking.
XTerm mouse highlight tracking is a kind (the only kind?) of mouse reporting that does BOTH
- report mouse events to the application AND
- allow selection of text into the primary selection (clipboard).
at the same time.
XTerm mouse highlight tracking would be enabled by echo -n -e "\033[?1001h"; the patch doesn't do this - in the interest of minimal invasion.
Disable by: echo -n -e "\033[?1001l"
Note that if you enable highlight tracking, the user clicks somewhere and you do not answer back with a range, XTerm will hang. So do not enable highlight tracking without doing all of the following:
The entire conversation between XTerm and the application looks like:
- to XTerm: \033[?1001h
- (let user mouse-down somewhere)
- from XTerm: \033[M!!!
- to XTerm(with a boundary range): \033[1;&LtPos;start-x>;&LtPos;start-y>;&LtPos;first-valid-row>;&LtPos;last-valid-row>T
- (user releases mouse button:) from XTerm: \033[t!!
(or something like \033[T!!!!!! if the selection was not valid text)
- to XTerm: \033[?1001l
Coordinates and row indices are 1-based.
The patch adds 5. only, the only part that has to be done in the RTL (as far as I can tell).
Mantis conversion info:
- Mantis ID: 13414
- Version: 2.3.1