Bug 268792

Summary: [KeyBindings] Bind multiple commands to same key sequence
Product: [Eclipse Project] Platform Reporter: Christopher Barber <christopher.barber>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Christopher Barber CLA 2009-03-16 10:15:07 EDT
I would like to be able to bind multiple commands in Eclipse to the same key binding. 

For example, I frequently find myself doing two different flavors of "refresh" on an open project in the Navigator: File Refresh + Source Code Control Refresh (Perforce in my case). I bound Perforce Refresh to Ctrl+F5 so I can do F5, Ctrl+F5 to get what I want, but I would rather I could bind both to F5.

Although it probably doesn't matter for my use case, such a feature should allow you to specify the order of the commands.
Comment 1 Paul Webster CLA 2009-03-16 12:41:03 EDT
You can use different commands for the same keybinding either 1) if they are bound to F5 in different contexts (that wouldn't work in your case) or 2) if you bind both commands to F5 and cause a conflict.

That will pop open a little dialog to allow you to choose which command you meant.

If the file refresh is a system command, you might have to unbind it and rebind it to F5 to get the little dialog.

PW
Comment 2 Christopher Barber CLA 2009-04-03 16:07:34 EDT
I don't see any popup dialog when I bind both commands to F5. When I bind Perforce Refresh to F5 when the system refresh is already bound, then nothing happens when I hit F5. When I unbind the system refresh and bind it again, then F5 just does the system refresh and not the Perforce refresh. In no case do I see a popup-dialog.

Is the dialog a new feature in 3.5? I am still using 3.4.2.
 
Comment 3 Paul Webster CLA 2009-04-06 09:34:18 EDT
No, the dialog should be there in 3.4.x as well (it's just using the CTRL+SHIFT+L dialog that's already available).

What matters for keybindings is the context that they are bound in.  For example, the default system refresh (F5) is bound in org.eclipse.ui.contexts.window.  What does the perforce keybinding look like? (the Plug-in Registry View should be able to tell you).

If it is bound as well, they are both "system" key bindings.  To get the conflict window, either both have to be system bindings, or you have to unbind refresh (F5) and then rebinding (that turns it into a user binding).

PW


Comment 4 Eclipse Webmaster CLA 2019-09-06 15:36:17 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.