Bug 445616 - Update broke keys and colors in Midnight Commander.
Summary: Update broke keys and colors in Midnight Commander.
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: keyboard (show other bugs)
Version: 21.08.2
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-16 21:39 UTC by Martin Collins
Modified: 2022-08-14 17:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Collins 2021-11-16 21:39:20 UTC
SUMMARY
In Midnight Commander a number of important keys either no longer work or do something wrong. Also some of its colors have changed, hampering usability.


STEPS TO REPRODUCE
1. Run mc in a konsole.
2. Try pressing F1-F4, home, end, numpad operators, probably more.
3. Look at the colors!

OBSERVED RESULT
Some of the keys no longer work or do the wrong thing. eg. F3 should view a file, instead it selects all files. And they go brown instead of yellow.
Oh, probably unrelated but Chinese characters are still broken too. That was from an earlier update.

EXPECTED RESULT
No surprise changes to my precious mc.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Sparky Linux 6.1 (Debian Testing) kernel 5.14.0-4-amd64
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I tried running mc in a UXTerm. Still normal.
Comment 1 Ahmad Samir 2021-11-17 08:40:43 UTC
About the keyboard shortcuts, make sure the selected keyboard translator scheme in Edit current profile -> Keyboard, is "Default XFree 4".
Comment 2 Martin Collins 2021-11-17 13:15:28 UTC
It is Default (XFree 4). I tried Linux Console and that works much better. I changed back to Default (XFree 4) and it is still faulty. Maybe I'll stick with Linux Console.
Comment 3 Duncan 2021-11-22 09:37:40 UTC
FWIW I believe the color thing was now-fixed bug #435309.
Comment 4 Ahmad Samir 2021-11-22 10:20:19 UTC
Check what the characters the key codes are sending, e.g.:
- press/release Ctrl+v
-  then press F3, compare what characters it's sending to the terminal in both keyboard schemes (or if mc works in a new user account...etc)

For example on my system F3 sends:
^[OR

F1:
^[OP
Comment 5 Martin Collins 2021-11-22 14:34:01 UTC
(In reply to Duncan from comment #3)
> FWIW I believe the color thing was now-fixed bug #435309.

I don't think so. That bug is all about text selection and was fixed in 21.08. This problem is not only selection but colors in general in mc (ncurses?) and I'm running 21.08.2 so presumably have that fix.
Comment 6 Ahmad Samir 2021-11-22 14:47:55 UTC
Also it might be useful to try with a new user account, just in case something in your current one is interfering.
Comment 7 Martin Collins 2021-11-22 15:29:41 UTC
(In reply to Ahmad Samir from comment #4)
> Check what the characters the key codes are sending, e.g.:

              F1      F2       F3       F4       F5         Home End
Xfree4  ^[OP  ^[OQ  ^[OR  ^[OS  ^[[15~  ^[[H  ^[[F
Linux    ^[[[A  ^[[[B  ^[[[C  ^[[[D  ^[[[E  ^[[1~  ^[[4~
Comment 8 Martin Collins 2021-11-22 15:40:56 UTC
I wonder if the default key bindings changed. If it used to be Linux Console and got changed to XFree 4 that would make sense.

Incidentally, the broken Chinese character rendering also happens in UXTerm so I guess that is not a Konsole problem.
Comment 9 Ahmad Samir 2021-11-22 15:43:30 UTC
The default has always been XFree4, AFAIK.

When you select XFree4 in the config dialog, the "Defaults" (i.e. reset) button is disabled?
Comment 10 Martin Collins 2021-11-22 15:57:53 UTC
(In reply to Ahmad Samir from comment #9)

> When you select XFree4 in the config dialog, the "Defaults" (i.e. reset)
> button is disabled?

Yes, and also when I select Linux Console. I guess that only enables when you have edited a binding? I haven't messed with that at all.
Comment 11 Ahmad Samir 2021-11-22 16:26:09 UTC
(In reply to Martin Collins from comment #10)
> (In reply to Ahmad Samir from comment #9)
> 
> > When you select XFree4 in the config dialog, the "Defaults" (i.e. reset)
> > button is disabled?
> 
> Yes, and also when I select Linux Console. I guess that only enables when
> you have edited a binding?
[...]

Exactly...
Comment 12 Martin Collins 2021-11-22 16:45:00 UTC
(In reply to Ahmad Samir from comment #6)
> Also it might be useful to try with a new user account, just in case
> something in your current one is interfering.

Well now. I created a new user and the keys, the colors, and even the Chinese characters work as they should.
I guess that means something in my config files disagrees with some update. I haven't done much configging lately but I do have 20 years worth of accumulated . files hanging around. Any suggestions where I should focus my attention?
Comment 13 Ahmad Samir 2021-11-22 16:56:18 UTC
Yeah, I know the feeling.

-  ~/.config/konsolerc         this is the app general settings
- ~/.local/share/konsole/   this is where the profiles live
- .bashrc, .bash_profile, .inputrc (if you have one)
- locale settings
- keyboard layout differences between the two accounts

did you try a new konsole profile?
Comment 14 Martin Collins 2021-11-22 18:14:33 UTC
(In reply to Ahmad Samir from comment #13)

> did you try a new konsole profile?

No change.

> - ~/.local/share/konsole/   this is where the profiles live

There is also konsoleui.rc here which the new user does not have. I renamed it and ran a new konsole. That seems to have fixed the keys, even though a new one got created that diff says is the same as the old one !? 
Likewise New Colour Scheme.colorscheme, though renaming it had no effect on the colors.

> -  ~/.config/konsolerc         this is the app general settings

Not seeing anything suspicious in there. Tried renaming it anyway but it didn't fix the colors.

Hmm, there was a sizeable update this morning. I'm wondering if that is why the new user works and the keys were fixed. I think I'll try rebooting.
Comment 15 Martin Collins 2021-11-22 19:11:26 UTC
After a reboot I still have all three problems. I may have confused myself with the XFree4/Linux Console binding thing.
Comment 16 Martin Collins 2022-08-14 17:06:30 UTC
I got some improvement by removing the TERM entry in the profile's environment settings.
Now I have replaced my laptop and did a new install. It all works correctly so I will close this.