Bug#921537: gnome-terminal: mouse wheel scrolling sends 6 key up / key down escape sequences (kcuu1 / kcud1) in alternate screen

Egmont Koblinger egmont at gmail.com
Thu Feb 7 19:15:11 GMT 2019


Hi,

> I'm wondering why this isn't documented in the GNOME Terminal help.

Because the help pages document the UI, and not the terminal emulation behavior.

It would be practically impossible to provide an exhaustive
description of the emulation behavior. (Even if we did so, a wiki page
or something similar would probably be a better platform; rather than
the help pages which are expected to get translated to a plethora of
languages.)

> I think that this should be part of the application configuration
> (e.g. less), which could enable this feature at startup and disable
> it before exiting.

That approach would have pros and cons, too. For example, it would
need to have explicit support from every application; it would only
work in those few that actually care enough to implement emitting
these sequences. Currently it works everywhere.

For apps that do care about it, they can implement mouse support so
that they receive the actual scroll event, and can act on it however
they wish. E.g. "less" could scroll back by 6 lines on its viewer, but
jump back by 1 entry in the search input field. You can't do this 6
vs. 1 line toggling with the 1007 mode.

I can't really imagine an app that doesn't care enough about scrolling
to add mouse handling, but would care enough to add support for this
1007 "fake scrolling".

Consider this feature a dirty hack for non-mouse-aware apps. :-)

I don't think it's a feature GNOME Terminal / VTE designed, by the
way. I think it originates from xterm, although I'm not entirely sure.


cheers,
egmont



More information about the pkg-gnome-maintainers mailing list