Bug 371560 - Do not automatically append the Meta key to the list of shortcuts when Alt+F1 is set; instead let the actual Meta key itself be used or removed as a shortcut
Summary: Do not automatically append the Meta key to the list of shortcuts when Alt+F1...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Archlinux Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: usability
: 447167 449959 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-24 09:37 UTC by Najjar
Modified: 2022-11-09 20:26 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
UI to explicitly reveal and configure the Meta/Win key activating Application Launcher (39.78 KB, image/png)
2021-01-07 23:50 UTC, skierpage
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Najjar 2016-10-24 09:37:20 UTC
I get that the meta key is used in Windows, and so new users expect it to work that way in Plasma too. I'm an old time user, and I haven't used Windows in years. I don't like that meta now kicks off Kickoff

I bind meta+[key] to a number of tasks and applications, and if I change my mind about that (I start pressing meta, but then decide "nah") the launcher appears. And it doesn't hide when meta is pressed again (bug 367685)

If KDE is adamant on having the meta key kickoff behavior as default, add an option to disable that. If not, then disable that behavior by default, and add an option to enable it for those who'd like it.

Reproducible: Always
Comment 1 Tony 2016-10-29 13:15:48 UTC
There is already one, remove ALT+F1 shortcut from the application launcher.

Although it would be nice to have one on system settings like "Numlock on plasma startup".
Comment 2 Peter Wu 2016-11-08 23:15:18 UTC
(In reply to Tony from comment #1)
> There is already one, remove ALT+F1 shortcut from the application launcher.

The problem is that both "Meta" and "Alt+F1" open the Kickoff menu. The expected behavior is that only "Alt+F1" should open the Kickoff menu. How would removing the "Alt+F1" shortcut help in this case?
Comment 3 Peter Wu 2016-11-11 14:31:44 UTC
Ok, apparently it has to be configured in KWin. Not the first place to expect such an option though.

Based on the linked Reddit post in https://blog.martin-graesslin.com/blog/2016/08/modifier-only-shortcuts-available-in-plasma-5-8/#comment-72021, it appears that you have to manually modify ~/.config/kwinrc and append:

[ModifierOnlyShortcuts]
Meta=

(then press Alt-F2 to get KRunner and execute "kwin_x11 --replace" to reload the configuration. Alternatively, log out, change the file and login.)
Comment 4 azrdev 2016-11-14 16:45:34 UTC
I had replaced (via the systemsettings GUI) the Kickoff-toggling shortcut Alt-F1 by Meta-Space. With plasma 5.8 this still worked, but pressing Meta now also opened the Kickoff (but cannot close it: <https://bugs.kde.org/show_bug.cgi?id=372477>).
Removing the custom shortcut Meta-Space with systemsettings removes *both* shortcuts at once, i.e. neither Meta nor Meta-Space open/toggle the Kickoff anymore.
Comment 5 Nate Graham 2018-10-20 15:59:20 UTC
When Alt+F1 is configured as the shortcut, KWin automatically binds Meta too. Removing the Alt+F1 hotkey will make the Meta key stop opening it.
Comment 6 Sasha Unspecified 2018-11-10 11:01:19 UTC
Why is it marked as "resolved"? The Application Menu clearly has to have an **intuitive** way to disable its opening on release of the Meta key (but **without** unassigning the Alt+F1 shortcut, which is **unrelated** to the Meta-key shortcut from user's perspective). I suppose, there should be a checkbox for that in Application Menu Settings (currently there is a "Keyboard shortcuts" section in Application Menu Settings, but it allows only to change/reassign regular (on-key-down) shortcut, but not to assign/unassign on-key-up-style Meta-key shortcut).
Comment 7 Peter Wu 2018-11-10 12:08:27 UTC
(In reply to Sasha Unspecified from comment #6)
> Why is it marked as "resolved"?

See comment 3 for a way to disable Meta while preserving Alt+F1. Still works for me with plasma-desktop 5.14.3. Granted, it is not intuitive but it is possible to configure the setting.
Comment 8 Sasha Unspecified 2018-11-10 15:35:24 UTC
I know that. But that's not a user-friendly way. That setting should be in "Application Menu Settings" or at least somewhere in GUI settings.
Comment 9 Nate Graham 2018-11-14 21:36:50 UTC
It *is* in the GUI settings: Right-click on Kickoff > Configure Application Launcher... > Keyboard Shortcuts > Remove Alt-F1 keyboard shortcut.

The one thing we should probably do is document the fact that Alt-F1 is magically turned into the meta key.
Comment 10 Sasha Unspecified 2018-11-15 06:46:54 UTC
(In reply to Nate Graham from comment #9)
> The one thing we should probably do is document the fact that Alt-F1 is
> magically turned into the meta key.

I strongly disagree.
The Meta key (key-up) should have no relation with Alt+F1 key.
For example, I use Alt+F1, but don't use Meta.
(There's setting for this in ~/.config/kwinrc — "[ModifierOnlyShortcuts]\nMeta=", but it's quite counter-intuitive.
I think, it should be a separate checkbox in the settings of "Application Menu" widget.)
Comment 11 Nate Graham 2018-11-15 06:48:52 UTC
I have to imagine that not actually using the meta key itself in the shortcut box is some kind of technical limitation rather than a design decision (because that would have been a bad design decision). I'll look into what the limitation was and see if we can fix that. If we can, then we will. :) But if not, then we can at least document the quick so it's not so inscrutable.
Comment 12 Sasha Unspecified 2018-11-15 07:07:31 UTC
(In reply to Nate Graham from comment #11)

I understand that there might be some technical limitations. (Though I can't imagine what they can be: even if KWin just sends Alt+F1 when the Meta key is pressed (and Alt+F1 is later processed independently by the Menu widget) — I think, it's possible for KWin to send arbitrary other key key-combination (the one that is configured as the primary shortcut in the Menu widget), not hard-coded Alt+F1 or not to generate any if the checkbox is unchecked; as the last resort, I think it's better to have an explicit "Turn Meta key into […] key" in the KWin GUI settings than hard-coded Alt+F1.)
Of course I agree that if nothing else can be done, it should be at least documented.

(P.S.: Now I'll change the title again — just for more readability.)
Comment 13 Sasha Unspecified 2018-11-15 07:13:15 UTC
(In reply to Sasha Unspecified from comment #12)

> send arbitrary other key key-combination
sorry, it should read as "send arbitrary key-combination"

> or not to generate any if the checkbox is unchecked
sorry, it should read as "and not to generate any if the checkbox is unchecked"

Anyway, great thanks.
Comment 14 Misha Shaygu 2020-12-10 06:34:40 UTC
on 5.20.4 still alive bug
Comment 15 skierpage 2021-01-07 23:49:24 UTC
(In reply to Tony from comment #1)
> There is already one, remove ALT+F1 shortcut from the application launcher.
> 
> Although it would be nice to have one on system settings like "Numlock on
> plasma startup".

(In reply to Nate Graham from comment #5)
> When Alt+F1 is configured as the shortcut, KWin automatically binds Meta
> too. Removing the Alt+F1 hotkey will make the Meta key stop opening it.

The problem is this undocumented automagical behavior of enabling the Meta/Windows key if and only if _any_ keyboard shortcut is defined to activate the Application Launcher.

The way to fix the inter-related bugs in behavior and UX is a separate option as others suggested. I mocked up a checkbox, see attachment,
   [x] Meta/Win key also activates Application Launcher applet.
which should appear in both places you can configure the shortcut: 1) right-click launcher icon in Task Manager > Configure Application Launcher > Keyboard Shortcuts ; and 2) System Settings > Shortcuts > Plasma > Activate Application Launcher Widget. BTW the UI must mention the "Win" key (and Apple's keycap name?), since most users have _no idea_ what the "Meta" key is.

Other notes:

You can't use the shortcut UI in either dialog to explicitly assign Meta because the dialog shows Meta+... and waits for another keypress.

In my case Meta and Alt-F1 stopped working (probably because I tried editing the fragile file ~/.config/plasma-org.kde.plasma.desktop-appletsrc to address bug 421498) and I was unable to get Meta working again until I assigned Application Launcher to some other random key combination. I began filing my own bug about this, so this bug's summary is still imperfect.

It may be possible to set Meta as the only shortcut by editing a config file. In the thread https://www.reddit.com/r/kde/comments/5ovjqu/super_key_meta_not_working_anymore/dcmehy8/?context=3 (where the great Martin Graesslin chimes in), someone suggested adding
  global=Meta
to the right containment in ~/.config/plasma-org.kde.plasma.desktop-appletsrc. instead of the common `global=Alt+F1`. Since every time I touch this file things get worse, I didn't try it 😉.
Comment 16 skierpage 2021-01-07 23:50:30 UTC
Created attachment 134650 [details]
UI to explicitly reveal and configure the Meta/Win key activating Application Launcher
Comment 17 skierpage 2021-01-08 00:01:37 UTC
(In reply to skierpage from comment #15)
> The problem is this undocumented automagical behavior...

It is documented in https://userbase.kde.org/Plasma/Tips#Windows.2FMeta_Key :
> If it's not working, make sure your "Start Menu" widget has a global
> shortcut like Alt+F1 set (you can't assign it directly to Meta, but
> it will open with Meta if another shortcut is assigned).
Comment 18 Sasha Unspecified 2021-01-08 16:50:38 UTC
(In reply to skierpage from comment #17)
> It is documented in https://userbase.kde.org/Plasma/Tips#Windows.2FMeta_Key

Even being documented, it's very counterintuitive.
Comment 19 Nate Graham 2022-02-11 22:45:28 UTC
*** Bug 449959 has been marked as a duplicate of this bug. ***
Comment 20 David Edmundson 2022-02-24 00:00:36 UTC
*** Bug 447167 has been marked as a duplicate of this bug. ***