rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.24k stars 212 forks source link

Removing "RC-Space" for Default SL - Launch Application Menu (gnome/kde) which commonly conflicts with Ulauncher's/Albert's evoking hot keys #824

Open behloolsabir opened 11 months ago

behloolsabir commented 11 months ago

Having this as the default settings can create very common Ulauncher and Albert evoking conflicts in Linux.

RedBearAK commented 11 months ago

@behloolsabir

Having this as the default settings can create very common Ulauncher and Albert evoking conflicts in Linux.

(As always, I'm not the Kinto dev, just a contributor/user.)

The defaults are designed to work with the "launcher" that the desktop environment would normally use. You can always customize your shortcuts to get around this. There is no perfect solution for users with custom launcher apps.

This has always been an issue for me, but the basic thing to understand is that you can map Cmd+Space to whatever you want in the Kinto config, and you can set the Ulauncher/Albert activation shortcut to whatever you want. Although I have often had a problem setting Ctrl+Space as the shortcut for those launchers, depending on the desktop environment. Sometimes I still have a problem with this even when Kinto is disabled.

And there are problems like this Ulauncher on Wayland issue:

https://github.com/Ulauncher/Ulauncher/wiki/Hotkey-In-Wayland

I use Ulauncher in GNOME on Fedora (similar to Ubuntu/GNOME) and to make it work properly I've set up custom shortcuts in the GNOME Settings app, under Keyboard.

Name: Ulauncher toggle (Alt+F1)
Command: ulauncher-toggle
Shortcut: Alt+F1

Name: Ulauncher toggle (Alt+Space)
Command: ulauncher-toggle
Shortcut: Alt+Space

The second custom shortcut enables Ulauncher to behave the same way when I use physical Alt+Space whether Kinto is enabled or not.

I also make sure I install wmctrl like the issue above mentions, and install a GNOME Shell extension like "Grand Theft Focus", or Ulauncher's dialog can end up not receiving the keyboard focus when I'm in a terminal window.

I also set an alternate shortcut to activate the Activities Overview with Shift+Cmd+Space, so I can still get to it without the mouse when the overlay-key binding to Meta/Super/Win is disabled.

Instead of Kinto I use my own project now that is based on Kinto (Toshy), but all of this basically works the same in my project as well.

behloolsabir commented 11 months ago

Thank you for the detailed answer and I like some of the personal taste modifications you made.

I understand Ulauncher or other similar apps are not default apps however large the adoption maybe.

Even if one doesn't use Ulauncher like apps, one can argue, how important/frequently used 'Launch Application Menu' is. Based on my personal usage and some observation of other users around me, I haven't seen big adoption of this option (in Ubuntu). In fact before having Kinto on my system I didn't even know this option existed as it was mapped 'alt+f2'. The choice of having that ergonomic unfriendly shortcut (in Ubuntu) as default also highlights its importance.

Some open questions if we answer we can do better decision making going forward - Is there a framework which we can use to prioritize one shortcut over another in case of a conflict? Additionally, what functionality one must give on very important keybindings (such as cmd+space here)?

RedBearAK commented 11 months ago

Alt+F2 in GNOME brings up the "Run" dialog, that lets you run arbitrary commands. That's not the same thing.

The shortcut that is used internally on some Linux desktop environments is Alt+F1, and that is also what they remap the Meta/Super/Win key to activate. So Kinto just uses the pre-existing shortcut where it will work. On Xfce, it uses Ctrl+Esc instead.

I don't really know why you would want to disable the remap by default. That would just make the Cmd+Space shortcut do nothing unless the user installs an alternate launcher, or manually assigns the Cmd+Space (RC+Space) shortcut to something using methods outside of the Kinto config file.

There are multiple solutions to your problem of having a conflict with the Kinto config. You've already found the line and disabled it. Another thing you could do is assign a different shortcut to the alternate launcher, and just change the remap in the config file so that Cmd+Space remaps onto that shortcut.

It's a keymapper config, so inevitably if you want to do something other than use the default app launcher for your desktop, there will be some kind of conflict. But as you've seen, you can just disable the line in the config.

I doubt the Kinto dev will accept a PR that disables the Cmd+Space remap. For most users, it works fine and there is no conflict with anything, so disabling it by default doesn't make much sense.