id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4149	TERM=alacritty, TERM=tmux and TERM=tmux-256color don't handle Shift+F<N>.	slyfox	andrew_b	"'''alacritty''' (https://github.com/alacritty/alacritty) is an xterm-compatible terminal. Note how small the diff is (no diffs around '''kf*''' entries):

{{{
$ infocmp -a1 xterm alacritty
comparing xterm to alacritty.
    comparing booleans.
        ccc: F:T.
        hs: F:T.
        km: T:F.
    comparing numbers.
        colors: 8, 256.
        pairs: 64, 65536.
    comparing strings.
        dsl: NULL, '\E]2;\007'.
        fsl: NULL, '^G'.
        initc: NULL, '\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\'.
        ka1: '\EOw', NULL.
        ka3: '\EOy', NULL.
        kb2: '\EOu', '\EOE'.
        kbs: '^H', '^?'.
        kc1: '\EOq', NULL.
        kc3: '\EOs', NULL.
        mgc: '\E[?69l', NULL.
        oc: NULL, '\E]104\007'.
        rs1: '\Ec', '\Ec\E]104\007'.
        setab: '\E[4%p1%dm', '\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m'.
        setaf: '\E[3%p1%dm', '\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m'.
        setb: '\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m', NULL.
        setf: '\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m', NULL.
        smglr: '\E[?69h\E[%i%p1%d;%p2%ds', NULL.
        tsl: NULL, '\E]2;'.
        Se: '\E[2 q', '\E[0 q'.
        TS: NULL, '\E]2;'.
        ka2: '\EOx', NULL.
        kb1: '\EOt', NULL.
        kb3: '\EOv', NULL.
        kc2: '\EOr', NULL.
        kp5: '\EOE', NULL.
        kpADD: '\EOk', NULL.
        kpCMA: '\EOl', NULL.
        kpDIV: '\EOo', NULL.
        kpDOT: '\EOn', NULL.
        kpMUL: '\EOj', NULL.
        kpSUB: '\EOm', NULL.
        kpZRO: '\EOp', NULL.
}}}


'''tmux''' is a '''screen'''-compatible wrapper. '''infocmp -a1 screen-256color tmux-256color''' is a bit bigger. I'll omit it.


All of the melow fails on '''ncurses-6.2''':

{{{
# in alacritty
$ TERM=alacritty mc
< press Shift-F6 to rename a directory>
< got: F8 response >

# in tmux in xterm
$ TERM=tmux mc
< press Shift-F6 to rename a directory>
< got: F8 response >

# in tmux in xterm
$ TERM=tmux-256color mc
< press Shift-F6 to rename a directory>
< got: F8 response >
}}}

I think '''xterm''' and '''screen''' only work because '''mc''' hardcodes terminal names in '''misc/mc.lib''':

{{{
...
[terminal:xterm]
...
f16=\\e[29~;\\e[17\;2~
...

[terminal:gnome]
copy=xterm

[terminal:rxvt]
copy=xterm

[terminal:xterm-new]
copy=xterm

[terminal:xterm-color]
copy=xterm

[terminal:xterm-256color]
copy=xterm

[terminal:screen]
copy=xterm

[terminal:screen-256color]
copy=xterm
...
}}}

We can hardcode a few more $TERM names, but it does not scale very well and is not compatible to user-defined terminal definitions if they chose to do it.

WDYT of making feature detection based only on '''terminfo''' capabilities if those are sufficient?

{{{
$ LANGUAGE=en mc --version
GNU Midnight Commander 4.8.25
Built with GLib 2.64.5
Built with S-Lang 2.3.2 with terminfo database
With builtin Editor and Aspell support
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish, smbfs
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
}}}
"	defect	closed	major	4.8.26	mc-tty	4.8.25	fixed					merged	committed-master
