https://bugs.kde.org/show_bug.cgi?id=513525

            Bug ID: 513525
           Summary: Feature Request - Automatic enable/disable of meta key
                    opening Application Launcher when running specified
                    applications
    Classification: Plasma
           Product: plasmashell
      Version First master
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: Application Launcher (Kickoff) widget
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: 1.0

Created attachment 187770
  --> https://bugs.kde.org/attachment.cgi?id=187770&action=edit
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!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to