elementary / switchboard-plug-keyboard

Switchboard Keyboard Plug
GNU General Public License v2.0
28 stars 22 forks source link

Disable layout switching if only one layout #388

Closed jeremypw closed 2 years ago

jeremypw commented 3 years ago

Fixes #387 (when one layout).

This is a possible way of improving the situation with shortcuts that include Alt + Shift. There are some unanswered questions:

jeremypw commented 3 years ago

An attempt to fix this in Gala failed - changes are required upstream (Mutter).

davidmhewitt commented 3 years ago

I've not really reviewed the code or tested the functionality yet, but in theory, the idea is sound. However, to answer one of your questions:

Is this shortcut disabled after installation? If not, should it be if there is only one layout? Where is this done?

No, it's not disabled by default: https://github.com/elementary/default-settings/blob/be24c151492bb9115c75bd1a7abc88714240294a/overrides/default-settings.gschema.override.in#L19

https://github.com/elementary/default-settings/issues/4

If it were to be disabled by default, we'd need to look at initial-setup and/or settings-daemon to ensure that it was re-enabled if a user selected two layouts when they created their account.

danirabbit commented 2 years ago

@jeremypw I think I agree with David that we should probably handle this in settings-daemon. That way we can be sure that it's done when the user is first created and we update no matter how the user changes their layouts

jeremypw commented 2 years ago

OK, in that case I'll close this PR. Thanks for having a look at it.