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

Physical ctrl+tab doesn't change tab on browsers on Ubuntu #823

Open behloolsabir opened 11 months ago

behloolsabir commented 11 months ago

Is your feature request related to a problem? Please describe.

OS: Ubuntu 22.04.3 LTS Keyboard: Tried on both ANSI and ISO Layout

ctrl+tab on on browser changes tab as well as go to Activies Overview. Surprisingly the whole feature is not missing ctrl+shift+tab has the expected behaviour i.e. takes you to the left tab.

Describe the solution you'd like Expect ctrl+tab to just change tabs on the browser to right similar to how ctrl+shift+tab takes you to the left but doesn't trigger Activities Overview.

Describe alternatives you've considered None. Trying other alternatives to switch tabs such as alt+shift+brackets

RedBearAK commented 11 months ago

@behloolsabir

(I'm not the Kinto dev, just a user and contributor.)

Normally the Kinto installer disables the "overlay-key" shortcut, which is what causes Meta/Super/Win to open the GNOME Activities Overview. And the physical Ctrl key becomes Meta/Super/Win with Kinto's modifier remapping. Except in terminal apps, where it stays LEFT_CTRL.

Here is how it works:

Disable overlay-key:

gsettings set org.gnome.mutter overlay-key ''

Enable overlay-key:

gsettings reset org.gnome.mutter overlay-key

If the physical Ctrl key still activates the Overview after running the first command in a terminal, that will be strange.

behloolsabir commented 11 months ago

Thank you for your quick response!

Ideally, I would expect the overlay when ctrl is hit but with ctrl+tab shouldn't trigger overlay.

However, I tried the disabling but it still overlays on just the ctrl itself and and hence obviously on ctrl+tab as well :cry: . I wonder if it requries a restart.

RedBearAK commented 11 months ago

Usually in my experience it takes effect right away. Try doing the reset command and then repeat the disable command.

If it still doesn’t disable the Super key you can try restarting, but I doubt that will work, unless there’s something really odd going on with your GNOME shell. I’ve never seen those commands fail. I use the same command in my Kinto offshoot Toshy.

Make sure you aren’t using any shell extension that could be redirecting the Super key on its own, independent of the overlay-key setting.

behloolsabir commented 11 months ago

Maybe I did something wrong before. But the overlay does stop after gsettings set org.gnome.mutter overlay-key ''

As previously mentioned, this solution still may not be suitable for my needs. Is there a way to enable the overlay feature when needed, but disable it when using the ctrl + tab shortcut?

RedBearAK commented 11 months ago

Not sure. But you should be able to get the Overview with Cmd+Space as the Mac-like alternative, which remaps to things like Alt+F1 or Ctrl+Esc depending on the desktop you are using when you install Kinto.

RedBearAK commented 11 months ago

The "problem" with these solutions like Kinto/Toshy (if you want to see it that way) is that we have to remap onto a shortcut scheme (Linux desktops and apps) that primarily revolves around using the Ctrl key. Moving the Ctrl key code onto physical Alt (or physical Cmd on an Apple keyboard) to simulate how things work on a Mac means that Meta/Super/Win/Cmd has to move somewhere else. The only other solution is to completely remove the Meta/Super/Win/Cmd key modifier even for non-terminal apps, and that would require remapping a number of shortcuts from LEFT_CTRL+Something to Super+Something. This is already done in a couple of cases to keep certain shortcuts working in terminals the same way they do in GUI apps.

That said, I don't have this problem while using GNOME in Fedora. Even with overlay-key still enabled, I can use Ctrl+Tab in Firefox and it doesn't open the Overview. Maybe this is because I'm using my project (Toshy) and it uses a fork of the keymapper that Kinto uses (xkeysnail), called "keyszer", which is highly modified since it was forked from "xkeysnail".

Keyszer has a "suspend" feature that tries to prevent this sort of thing, but I basically have that disabled (set to 0.1 seconds) and I still don't have the Overview popping up just because the Meta/Super key is in a shortcut.

I don't like to suggest this right away as a solution to everything, but Toshy does a number of things differently, and you might want to try it. You'd need to stop Kinto and disable its Auto-start (from its tray icon or GUI app menu), or one will not work when they both try to use the same uinput device. You will probably also be asked to reboot to enable some new permissions/groups. So it's important that Kinto does not auto-start if you're trying Toshy.

https://toshy.app

Toshy keeps the files it needs in an isolated Python virtual environment location, so it won't otherwise interfere with Kinto or anything else, and you can uninstall Toshy with this installer option if it doesn't work the way you want.

./toshy_setup.py --uninstall

Make sure you report issues with Toshy, if you have any, on the Toshy repo instead of here.

https://github.com/RedBearAK/toshy/issues