From 159ae6cb95cc119a14696da337df730aee4661d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 5 Aug 2021 19:21:57 +0200 Subject: [PATCH] terminfo: change kmous to \E[<, add XM+xm capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ncurses has had a bug where mouse support is completely disabled if the terminfo didn’t have kmous=\E[M, *or*, the terminfo *name* contained ‘xterm’. This appears to have been fixed. Thus, change kmous to \E[<, and set xm/XM accordingly. With this, ncurses application will use the SGR mouse reporting mode, instead of the legacy reporting mode. --- CHANGELOG.md | 2 ++ foot.info | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78b297c9..8d971660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ of box drawing characters rendered by foot itself (rather than using font glyphs) (https://codeberg.org/dnkl/foot/issues/474). * `ich1=\E[@` to terminfo. +* `XM`+`xm` to terminfo. ### Changed @@ -52,6 +53,7 @@ after closing the PTY, instead of waiting 2 seconds. * Foot now sends `SIGTERM`/`SIGKILL` to the client application’s process group, instead of just to the client application’s process. +* `kmous` terminfo capability from `\E[M` to `\E[<`. ### Deprecated diff --git a/foot.info b/foot.info index da13d2f2..f670e1f8 100644 --- a/foot.info +++ b/foot.info @@ -36,6 +36,7 @@ foot+base|foot base fragment, Se=\E[ q, Ss=\E[%p1%d q, Sync=\EP=%p1%ds\E\\, + XM=\E[?1006;1000%?%p1%{1}%=%th%el%;, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, @@ -225,7 +226,7 @@ foot+base|foot base fragment, khome=\EOH, kich1=\E[2~, kind=\E[1;2B, - kmous=\E[M, + kmous=\E[<, knp=\E[6~, kp5=\EOE, kpADD=\EOk, @@ -278,12 +279,7 @@ foot+base|foot base fragment, u8=\E[?%[;0123456789]c, u9=\E[c, vpa=\E[%i%p1%dd, + xm=\E[<%i%p3%d;%p1%d;%p2%d;%?%p4%tM%em%;, -# XM tells ncurses how to initialize the mouse. The xterm terminfo -# uses this to enable SGR (1006h). However, doing this also requirese -# kmous=\E[<. But, ncurses *also* disables the mouse _completely_ if -# kmous != \E[M (unless the TERM name contains "xterm"...) # XT, # AX, -# XM=\E[?1006;1000%?%p1%{1}%=%th%el%;, -# xm=\E[<%p1%d;%p2%d;%p3%d;%?%p4%tM%em%;,