GNOME Bugzilla – Bug 373934
Allow multiple binding in gnome-keybinding-properties
Last modified: 2021-06-09 20:42:53 UTC
sometimes an action got a standard keybinding, but is also provided by a dedicated "multimedia" key gnome-keybinding-properties should therefore allow binding a list of shortcuts to each action, not force a single access
Could you clarify please? You want to assign multiple keys to the same action? Which of the current actions would you want to assign several key combinations to?
Yes, some actions are common enough 1. they have a standard keybinding 2. some keyboards provide dedicated keys for them 3. sometimes they also have dedicated mouse keys (3rd standard accessor) I'd like to have my system accept all of them concurrently so declaring one of those does not deactivate the others and confuse users with different habits I don't have the actual hardware nearby, but you can guess them as well as me (next, previous, mail reader, etc)
I confirm this. I often like to have two or more shortcuts for the same actions. For instance, one that is easy to touch while I'm typing (thus two-handed) and one that's easy one-handed, for when I'm using the mouse or I'm not actively using the computer. See also this on Ubuntu's buglist: https://bugs.launchpad.net/bugs/106573
I don't think it would be a good idea at all to have support for multiple keybindings per action. For keys like "Play", "Pause", etc. the correct fix is to have all your keyboards/mice/etc. have correct keymaps, so they're mapped to XF86AudioPlay, etc. Could you please explain precisely the problem you're encountering?
1. many multimedia keyboards sport unmarked user-assignable keys, so a fixed keymap is not possible as different users will want to associate these keys with different actions (see the microsoft ergo 4000 keyboard for example). 2 Almost every mouse with more than 3 buttons is supposed to have its supplemental buttons assigned by the user depending on his particular preferences 3. PVR cards had IR/RF HID remotes to the mix, again with user assignable buttons 4. even when the keys are not intended to be user-assignable you can have several variants that have not the same keymap but should trigger the same actions within gnome (this is also true for pre-multimedia-keys keyboards, as for example the numpad and the main keyboard area do not export the same keys even though they have the same effect most of the times) 5. Having a keyboard that sports a "play" key should not kill the non-multimedia-key keybinding as visitors won't use the multimedia key if they're used to a keyboard without it (also multimedia keys are often less reliable/ergonomic than normal keys as vendors seem to love using weird forms and material for them). Associating the help key with yelp should not kill F1, etc. 6. Also a separate problem but I'll put it there anyway. When you have a play button on the keyboard and another on the mice it'd be real nice if one could have the first button control totem and the other rhythmbox. Even if they both export XF86AudioPlay A simple 1-1 keybinging/action relation is really not sufficient for current hardware and user expectations
The dialog is called "Gnome Keybindings". Suppose I want to have two different key combinations that trigger the same command---say, "play". Which is the most logical: (1) Use the Gnome Keybindings dialog to assign the two combinations to the "play" command. (2) Use the Gnome Keybindings dialog to assign the XF86AudioPlay key code to the "play" command (redundant, isn't it?) and then hack some X files or enter some xmodmap commands in a terminal (maybe even edit some startup files, too) to map the two combinations to the XF86AudioPlay key code. Both methods work. One of them sucks.
(In reply to comment #6) > The dialog is called "Gnome Keybindings". Suppose I want to have two different > key combinations that trigger the same command---say, "play". Which is the most > logical: > > (1) Use the Gnome Keybindings dialog to assign the two combinations to the > "play" command. > > (2) Use the Gnome Keybindings dialog to assign the XF86AudioPlay key code to > the "play" command (redundant, isn't it?) and then hack some X files or enter > some xmodmap commands in a terminal (maybe even edit some startup files, too) > to map the two combinations to the XF86AudioPlay key code. > > Both methods work. One of them sucks. The method would actually be: (3) make sure you've selected the correct keymap, and the "play" button already works. Assign your preferred combination to the play function in the keybindings preferences. (In reply to comment #5) > 1. many multimedia keyboards sport unmarked user-assignable keys, so a fixed > keymap is not possible as different users will want to associate these keys > with different actions (see the microsoft ergo 4000 keyboard for example). Not having multiple keys supported only means you'll just > 2 Almost every mouse with more than 3 buttons is supposed to have its > supplemental buttons assigned by the user depending on his particular > preferences Those are mouse buttons, not keyboard keys, and we don't handle them at all right now. I would see another interface in the mouse preferences to handle them, even if we share code in the end. See: http://bugzilla.gnome.org/show_bug.cgi?id=140279 > 3. PVR cards had IR/RF HID remotes to the mix, again with user assignable > buttons This can easily be solved by LIRC itself, similarly to what we do for Bluetooth devices in bluez: - LIRC has a mapping for the remote (nice default, and user application to setup the buttons) - LIRC listens to events from the IR/RF remote and feeds them into a fake input device, they show up as normal keys with the right keysyms in X. There's no need to have multiple key bindings to support those. > 4. even when the keys are not intended to be user-assignable you can have > several variants that have not the same keymap but should trigger the same > actions within gnome (this is also true for pre-multimedia-keys keyboards, as > for example the numpad and the main keyboard area do not export the same keys > even though they have the same effect most of the times) I don't understand what you mean here. > 5. Having a keyboard that sports a "play" key should not kill the > non-multimedia-key keybinding as visitors won't use the multimedia key if > they're used to a keyboard without it (also multimedia keys are often less > reliable/ergonomic than normal keys as vendors seem to love using weird forms > and material for them). Associating the help key with yelp should not kill F1, > etc. That's the contrary of what I explained. The multimedia key is hard-coded and will just work. You can then assign another keybinding to the action in addition to the default. As for F1, it's a bad example, F1 is handled by applications. > 6. Also a separate problem but I'll put it there anyway. When you have a play > button on the keyboard and another on the mice it'd be real nice if one could > have the first button control totem and the other rhythmbox. Even if they both > export XF86AudioPlay That's featuritis IMO. We handle this currently by having the last focused application receive the playback events. > A simple 1-1 keybinging/action relation is really not sufficient for current > hardware and user expectations I think it is. Let me know if you have any more ideas that couldn't be solved by the solutions I mentioned.
(In reply to comment #7) > (In reply to comment #6) > > The dialog is called "Gnome Keybindings". Suppose I want to > > have two different key combinations that trigger the same > > command---say, "play". [ snip ] > The method would actually be: > (3) make sure you've selected the correct keymap, and the > "play" button already works. Assign your preferred combination > to the play function in the keybindings preferences. I didn't express myself very well. I _don't_ have a "play" button on the keyboard. I want two different _combinations_ to do the "play" (and a few other) command. For instance, I'd like to have "<Super> Q" _and_ "<Super> Insert" trigger "play/pause", and to have "<Super> E" _and_ "<Super> PageDown" trigger "next track". (If you're curious of the reason, the q/e ones are very comfortable while touch-typing, and the insert/pgdown are easier to find when I'm not actively typing, e.g. when the computer is playing music but I'm reading a book or something. I have another half-dozen similar pairs of preferred key bindings.) The part about XF86AudioPlay I mentioned in my previous post was just the only workaround I could find.
Bastien, > That's the contrary of what I explained. The multimedia key is hard-coded and > will just work. You can then assign another keybinding to the action in > addition to the default. As for F1, it's a bad example, F1 is handled by > applications. This I don't undestand. I have a macbook pro with an IR remote control and am struggling with a similar problem to that of Nicolas, who opened the thread. If, for example, while setting the shortcut for 'Play' I press the "play/pause" button on the remote, XF86AudioPlay shows up as shortcut. That is allright. But now, I don't have any multimedia buttons on my keyboard, so I want the shortcut <Control><Alt>\ for the same action as well. Contrary to what you wrote above, if I set the keyboard shortcut for the "play/pause" action, my remote control ceases to work! Is there any intuitive way to get to work both options? In what way are the multimedia keys hardcoded? They have to be mapped too, don't they? I think this matter deserves not only a second thought but also to be resolved.
*** Bug 599477 has been marked as a duplicate of this bug. ***
Another common scenario is using a laptop with an external keyboard. For example, when at home I'm typing on an external keyboard without multimedia keys. I'm using the numpad for play, stop, etc. When I'm travelling I'm using the laptop's keyboard which has multimedia keys and I'd like to use them. Easiest solution would be if I just could assign multiple bindings per action. This issue should definitely get resolved.
Mass move to new component "Keyboard" where the keyboard shortcuts live in GNOME 3.
(In reply to Burkhard from comment #11) > Another common scenario is using a laptop with an external keyboard. For > example, when at home I'm typing on an external keyboard without multimedia > keys. I'm using the numpad for play, stop, etc. When I'm travelling I'm > using the laptop's keyboard which has multimedia keys and I'd like to use > them. Easiest solution would be if I just could assign multiple bindings per > action. This issue should definitely get resolved. +1. It stll a problem in Gnome 3.14.
*** Bug 734254 has been marked as a duplicate of this bug. ***
*** Bug 673078 has been marked as a duplicate of this bug. ***
Since bug 673078 was just marked as a duplicate, I would like to report here that Gnome now ships with multiple keybindings by default (ctrl+alt+arrow and super+arrow) and the current interface doesn't support UNassigning one of them
*** Bug 662232 has been marked as a duplicate of this bug. ***
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new bug report at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/ Thank you for your understanding and your help.
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1385