Is there an existing issue for this?
Midnight Commander version and build configuration
Operating system
Is this issue reproducible using the latest version of Midnight Commander?
How to reproduce
Currently, Shift+Fn keys are off by 2 in ncurses build (#3254). I'm working on fixing it properly, but until then, let's try to fix it in "Learn keys".
You cannot. Go to Options -> Learn keys -> Function key 11 (mc's notation for Shift+F1), press Enter to learn the desired key, press Shift+F1. Then press Shift+F1 again to test the newly learned key.
Function key 13 gets an "OK".
I believe "Learn keys" should not only be able to learn new (previously unrecognized) escape sequences, but also to override the existing ones. I might fix Shift+Fn's off-by-2 problem, but other similar situations might occur elsewhere.
mc's knowledge about the escape sequences comes from multiple sources. We consult terminfo, while some are hardcoded to mc's binary, and some might come from the global mc.lib file. "Learn keys" (and its underlying storage: the user ini file) should strictly override all of those other sources, should be the first table we consult when looking up an escape sequence's meaning.
I suspect that it's not the fault of the "Learn keys" dialog but of the underlying engine (if you edit the config files manually). To be checked.
Expected behavior
.
Actual behavior
.
Additional context
No response
Is there an existing issue for this?
Midnight Commander version and build configuration
Operating system
.Is this issue reproducible using the latest version of Midnight Commander?
How to reproduce
Currently, Shift+Fn keys are off by 2 in ncurses build (#3254). I'm working on fixing it properly, but until then, let's try to fix it in "Learn keys".
You cannot. Go to Options -> Learn keys -> Function key 11 (mc's notation for Shift+F1), press Enter to learn the desired key, press Shift+F1. Then press Shift+F1 again to test the newly learned key.
Function key 13 gets an "OK".
I believe "Learn keys" should not only be able to learn new (previously unrecognized) escape sequences, but also to override the existing ones. I might fix Shift+Fn's off-by-2 problem, but other similar situations might occur elsewhere.
mc's knowledge about the escape sequences comes from multiple sources. We consult terminfo, while some are hardcoded to mc's binary, and some might come from the global
mc.libfile. "Learn keys" (and its underlying storage: the user ini file) should strictly override all of those other sources, should be the first table we consult when looking up an escape sequence's meaning.I suspect that it's not the fault of the "Learn keys" dialog but of the underlying engine (if you edit the config files manually). To be checked.
Expected behavior
.
Actual behavior
.
Additional context
No response