Bug 1224350

Summary: konsole/terminal steals focus from mc
Product: [openSUSE] openSUSE Tumbleweed Reporter: Marcela Maslanova <marcela.maslanova>
Component: BasesystemAssignee: Adam Majer <amajer>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: d_werner
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Marcela Maslanova 2024-05-16 09:22:37 UTC
Probably for a month or longer is konsole stealing focus of mc. 

Versions:
mc-4.8.31-3.2.x86_64
konsole-24.02.2-1.1.x86_64

Reproducer:
Run mc in konsole (or terminal)
Press F10 to close mc instead it will open the console menu.
Comment 1 Dirk Weber 2024-05-17 07:16:19 UTC
I also observed this behavior in Tumbleweed and I think
the reason is that konsole got a new keyboard shortcut:

"Open Menu": with the default assigned key F10.

After removing this shortcut from konsole (or assigning a less used key combination) F10 can again be used to quit mc.
Comment 2 Marcela Maslanova 2024-05-17 07:45:08 UTC
That's clever! Thank you.

It does do the same in GNOME terminal, but I do not care about GNOME ;-)
Comment 3 Adam Majer 2024-05-21 08:00:00 UTC
Yes, this is not a bug, it's a feature thing so closing as such :-)

When you press any key combination, it will

 1. first go through Xorg or Wayland
 2. if not handled, it goes through the Window Manager or Desktop environment and whatever shortcuts are configured there
 3. then, if not handled, it will go through the actual Terminal, so in this case konsole.
 4. eventually it will get to the actual program, so like mc, but only if it's not handled at any place higher in the stack.

At every step the key combination can disappear or be altered. So if you press something for `mc` but it does something in the encompassing program, you have to look at the shortcuts there and possibly re-assign them so that the key combination can travel all the way to `mc`

Also, the focus is not stolen by konsole as it always had focus in the first place ;)