I’m using GNU Screen inside mintty. To get the scroll wheel to work, I had to switch the mintty scroll wheel mode with an escape code (^[[?7787h
). This has the effect that the scroll wheel does not work in less
anymore. To fix this, I would need less
to send the appropriate escape codes to the outer terminal on start and exit.
I found the ^[P
escape code that can be used to send escape codes to the terminal running Screen. So I wanted to add ^[P^[[?7787l
to the ti
termcap inside screen. To achieve this I added this line to my .screenrc
:
termcapinfo * "" "\EP\E[?7787l\E[?1049h"
But that did not affect less
at all. I know that ^[P^[[?7787l
works – if I just echo it, everything is fine. I could just write a less
wrapper that handles that, but I would prefer to be able to do this via termcap, as it would then work in all aplications, not just in less.
So my question is: How can I change which escape codes less
sends to the terminal when it switches to the alternative screen?