Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Question) menu stealing focus when hitting Option/Alt #476

Open
Serg-VL opened this issue Dec 19, 2024 · 1 comment
Open

(Question) menu stealing focus when hitting Option/Alt #476

Serg-VL opened this issue Dec 19, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@Serg-VL
Copy link

Serg-VL commented Dec 19, 2024

You have in wiki article VSCode(s) and Firefox menu stealing focus when hitting Option/Alt.
But there are much more apps suffers...
I'm in Plasma.
I've started Toshy.
I've set keyboard switching to Cmd+Space, which KDE displays as Alt+Space.
Wherever I switch keyboard layout I also get to menu of apps:

  • firefox browser
  • vivaldi browser
  • thunderbird

However VSCode (and other electron based apps) not suffering from this!

May be mapping of Cmd+Space should be to Ctrl+Space?

@Serg-VL Serg-VL added the question Further information is requested label Dec 19, 2024
@RedBearAK
Copy link
Owner

@Serg-VL

The standard macOS keyboard shortcuts for input switching are physical Ctrl+Space/Shift+Ctrl+Space, so this is how the default Toshy config file is set up. If you were to reset the keyboard switching shortcut(s) back to its default, it should work from the physical Ctrl+Space keys.

Normally Cmd+Space is mapped onto some kind of app menu or launcher in each desktop environment. Most recently in Plasma this means it's mapped onto Alt+Space in the Toshy config file, to activate the krunner launcher/search dialog. This hasn't caused me a problem with Firefox since the menu would only steal focus if pressing Alt+Space as the input keys, not when remapping onto Alt+Space. So I'm not quite sure why this would be causing you an issue with those applications.

A long time ago these two shortcuts were reversed in macOS. The Ctrl+Space shortcut was originally used for Spotlight, and Cmd+Space was used for switching inputs (keyboard layouts). Is that why you chose to use Cmd+Space for input switching?

May be mapping of Cmd+Space should be to Ctrl+Space?

Actually when you press "Cmd+Space" with Toshy enabled, the key codes are initially RIGHT_CTRL+Space, then they get remapped onto something else. The virtualized Command key is always RIGHT_CTRL, which reduces the number of general remaps that have to exist in the config file.

The remap for Cmd+Space can be customized to anything you want, but I'd first like to figure out why you're having a problem with menu focus stealing when you aren't pressing Option/Alt.

There's a Wiki article about how to customize the Cmd+Space remap (or any remap that exists in the config file) with your own override, if you want to take a look at that.

https://github.com/RedBearAK/toshy/wiki/How-to-(persistently)-change-the-Cmd-Space-remap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants