GNOME Bugzilla – Bug 677427
media-keys keybindings should allow for multiple values
Last modified: 2019-03-20 11:00:02 UTC
When gnome-control-center switched to gsettings in 3.4, keyboard bindings became sets and it was possible to set multiple keyboard shortcuts to do the same action. I would specifically like to set Ctrl+Alt+L and Super+L (like Windows) as keyboard shortcuts for org.gnome.settings-daemon.plugins.media-keys screensaver. (In fact, I think both of those shortcuts should be set by default for everyone, so feel free to do that when this bug gets fixed. Thanks!) All of the keybindings in org.gnome.settings-daemon.plugins.media-keys should probably be switched to sets though, to be consistent.
for me too.... ctrl-shift-l means left ctrl-shift, ctrl-shift-r means right ctrl-shift. But I want use both ctrl-shift for switch keyboard layout.
(In reply to comment #1) > for me too.... > ctrl-shift-l means left ctrl-shift, ctrl-shift-r means right ctrl-shift. But I > want use both ctrl-shift for switch keyboard layout. We don't use this mechanism to capture and act upon modifier-only shortcuts to switch keyboard layouts. File a separate bug about this please.
*** Bug 762712 has been marked as a duplicate of this bug. ***
I agree I would like to see the value options for media-keys to be string arrays, like with shell keybindings(org.gnome.shell.keybindings) and not just strings as they currently are. My specific use case desire is the ability to have a keyboard shortcut to open the home folder without overriding the 'XF86Explorer' key. If this is functionality that would be accepted, I would be happy to submit a patch myself.
I don't see a problem with adding support for this in gnome-settings-daemon. In particular because mutter already supports this in most cases. We will need to make sure that migration works obviously. It would probably make sense to bring this up on the control-center side and the designers though. There we currently only allow setting a single keybinding currently. This might be intentional, but could also have unpleasant side effects e.g. when the default has multiple bindings and setting it removes the alternatives.
There's probably an unfinished patch somewhere in bugzilla for this. The gist is that you'd use g_settings_get_value(), and check the type of the key, whether it's a list or a single string. Note however that all the code in gsd-media-keys only knows how to handle a single shortcut per GSettings key. So you're going to have to modify that code to make sure that you minimise the work you're asking gnome-shell to do, and the keys you're going to ask it to capture, when the list is truncated, extended, reordered, or elements are modified.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/184.