| Summary: | Feature Request - Automatic enable/disable of meta key opening Application Launcher when running specified applications | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | pants |
| Component: | Application Launcher (Kickoff) widget | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | wishlist | CC: | kde, mikel5764, noahadvs |
| Priority: | NOR | ||
| Version First Reported In: | master | ||
| Target Milestone: | 1.0 | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | TXT containing python code for enabling and disabling the meta keybind for application launcher | ||
Games that prevent want to prevent this should install a shortcut inhibitor. In addition shortcuts are also inactive when they grab the x keyboard (via xwayland keyboard grab protocol). Dynamically active shortcuts are currently out of scope, sorry. |
Created attachment 187770 [details] TXT containing python code for enabling and disabling the meta keybind for application launcher Summary There should be a setting to disable the meta key when running certain apps (Games) in order to stop accidental presses or for when the meta key is used as a key bind. Details So I have recently switched from Windows 11 to Fedora 43 to use as my primary OS and for gaming. One of the games I play the most is ARMA 3 and one of the most popular mods for it is ACE. By default, ACE binds its interaction key to Windows/meta/super. On Windows this is no issue as the keystroke does not get passed to Windows Explorer, on Linux however, Plasma still captures the keystroke and opens the Application Launcher, this is undesirable and I don't want to change a 10 year habit when I can change my OS instead. Process So because of how Fedora/Plasma handles the keybinds you can't simply edit the configuration file and then restart the service, it simply ignores manual changes to kglobalshortcutsrc and kwin (when you edit and apply the keybind in the System Settings app it makes some .lock and .UekKRX files, and does some other stuff). I asked a friend who knows more than me on how to track it down, but basically I use dbus to monitor what happens when I change the setting via the System Settings and then wrote some python code that mimics the same process as the GUI. I have attached a txt file with the two bits of code for turning meta on and off. For my use case I edit gamemode.ini so when gamemode runs it runs the disable_meta.py and when it closes it runs enable_meta.py. Disabling global hotkeys was also not an option because I need Alt+Tab. Implementation Use dbus to hook into kglobalaccel Specify key codes Grab the application launcher stuff to rebind the keys Rebind the keys Thanks!