After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 373934 - Allow multiple binding in gnome-keybinding-properties
Allow multiple binding in gnome-keybinding-properties
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Keyboard
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 599477 734254 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-11-11 17:26 UTC by Nicolas Mailhot
Modified: 2021-06-09 20:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolas Mailhot 2006-11-11 17:26:22 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
Comment 1 Thomas Wood 2007-02-10 18:52:25 UTC
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?
Comment 2 Nicolas Mailhot 2007-02-16 23:16:21 UTC
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)
Comment 3 Bogdan Butnaru 2007-04-14 16:42:57 UTC
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
Comment 4 Bastien Nocera 2007-05-31 15:24:58 UTC
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?
Comment 5 Nicolas Mailhot 2007-05-31 15:49:44 UTC
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

Comment 6 Bogdan Butnaru 2007-05-31 19:33:55 UTC
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.
Comment 7 Bastien Nocera 2008-02-21 21:25:05 UTC
(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.
Comment 8 Bogdan Butnaru 2008-02-22 02:29:35 UTC
(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.
Comment 9 krzysztof pijarski 2009-07-24 15:07:01 UTC
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.

Comment 10 Jens Granseuer 2009-10-24 11:51:33 UTC
*** Bug 599477 has been marked as a duplicate of this bug. ***
Comment 11 Burkhard 2010-05-25 20:33:44 UTC
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.
Comment 12 Bastien Nocera 2011-02-09 15:30:35 UTC
Mass move to new component "Keyboard" where the keyboard shortcuts live in GNOME 3.
Comment 13 van.de.bugger 2015-03-19 01:01:11 UTC
(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.
Comment 14 Bastien Nocera 2016-09-08 15:53:46 UTC
*** Bug 734254 has been marked as a duplicate of this bug. ***
Comment 15 Bastien Nocera 2016-09-08 15:54:19 UTC
*** Bug 673078 has been marked as a duplicate of this bug. ***
Comment 16 Kåre Fiedler Chrisitiansen 2016-09-08 16:11:52 UTC
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
Comment 17 Allan Day 2016-11-11 17:33:53 UTC
*** Bug 662232 has been marked as a duplicate of this bug. ***
Comment 18 André Klapper 2021-06-09 16:33:51 UTC
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.