id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4512	mc should use kPRV5 from terminfo for Ctrl+PageUp	CyberShadow		"I noticed that the Ctrl+PageUp combination (to navigate to the parent directory) didn't work in wezterm (with `config.term = ""wezterm""`). A bit of experimentation showed that it worked when wezterm identified itself as xterm, or if mc is started with --xterm. Upon investigating, I found that the reason why it works with TERM=xterm is only because mc itself hard-codes the sequence that xterm uses (the xterm_key_defines array), when it detects that it is running in that terminal emulator (check in init_key) or with --xterm.

I am not sure if this is standardized anywhere, but I noticed that many terminal emulators declare the sequence for Ctrl+PageUp as the kPRV5 capability in their terminfo. Grepping for kPRV5 in my /usr/share/terminfo gives me over 60 matches. wezterm's terminfo doesn't have it yet, but it would not be a problem to add it.

I think it would be nice if mc checked terminfo for capability strings such as kPRV5, in order to support such key combinations in other terminals.

I can work on a patch with some guidance. I noticed the Key_xxx definitions in keyxdef.c, but it's not clear to me how to extend that to only teach mc about some new terminfo keys.
"	enhancement	new	major	Future Releases	mc-tty	master						no branch	
