Bug 1439886

Summary: Keys learned in "Learn Keys" are ignored
Product: [Fedora] Fedora Reporter: Pavel Roskin <plroskin>
Component: mcAssignee: Jindrich Novy <novyjindrich>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 26CC: alekcejk, dvlasenk, novyjindrich, pahan, slavazanko
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-07 20:28:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Roskin 2017-04-06 18:40:49 UTC
Description of problem:

I want Shift-Fn to work as F(10+n), not as F(12+n). mc uses different conventions dependent of its version and the terminal. However, it has been possible to set up the keys the way I want using the "Learn Keys" dialog.

Midnight Commander 4.8.19 (or perhaps the fact that it's built with ncurses now) breaks that functionality. Keys learned in the "Learn Keys" are ignored.

Version-Release number of selected component (if applicable):

mc-4.8.19-1.fc26.x86_64

How reproducible:

Every time

Steps to Reproduce:
1. Run mc on gnome-terminal (TERM=xterm-256color)
2. F9->Options->Learn Keys
3. Mouse click on "Function key 17" - "Teach me a key" message appears
4. Press Shift-F7, the message disappears
5. Press Shift-F7 again

Actual results:

OK appears near "Function key 19"

Expected results:

OK appears near "Function key 17"

Additional info:

The key is saved correctly to ~/.config/mc/ini

[terminal:xterm-256color]
f17=\\e[18\;2~

I believe that ncurses decoded escape sequences using its own rules before mc has a change to match them to the learned keys.

Please don't switch to ncurses until the upstream fixes that issue. It's very irritating, and it will force me to build mc on my own.

Comment 1 Pavel Roskin 2017-04-07 20:28:19 UTC
Closing favor of 1440110

*** This bug has been marked as a duplicate of bug 1440110 ***