Community
Participate
Working Groups
It would be very natural to assign my mouse button 4 to the "navigate->back" function (alt-left_arrow). that would allow me to navigate entirely with the mouse: ctrl-click to jump to class definitions, and back-click to jump backwards. as it is, i either have to find the back button (still faster than keyboard) or use the key combinations. it would also be nice to assign new functionality to shift-click and so on. rather than hard-code this into the IDE (as bug 27517 suggests) it would be natural to add it to the list of key shortcuts. as for buttons 4 and up being non-standard, look no further than quake3 to see how this is done. the interface needs to be interactive like that, and then there is no question which button on the mouse is button 4 - key settings go through the system and don't have to be guessed by the user (as it is now). [this is related to bug #27517 - allow back and forward mouse buttons]
Moving to ui since this is where user configuration would be done. Of course offering this would be dependent upon swt providing the help, so if ui plans to look into this then you may need to log an enhancement request with swt.
This enhancement makes me smile. :) We were already thinking of providing gesture and mouse binding support, but looking for an excuse. Do you have any interest in mouse gesture support?
just in case nobody is not aware about this. I have a microsoft intellipoint mouse and the driver allows you to assign special actions to the buttons. I have assigned to the thumb button the "Back" action via the microsoft driver. In eclipse the thumb button acts as alt-left_arrow. I know that this isn't a solution but more like a hack but I thought I would mention it so people can use it in the meantime!
(this isn't exactly mouse button 4+ support, but) for a brief period about a year ago i put mouse gesture recognition into eclipse (for like one integration build..), it worked the same as mozilla and opera's mouse gestures. this code is not stale. i has gestures working in the text editor only, and required you to press the right mouse button. it was only pulled because of an issue on motif and mac - their contexts menus appear on the mouse-down. mozilla handles this simply by allowing you to choose you mouse button (say button 4+) and/or requiring a modifier key to be held. we didn't add this preference (and save mouse gestures) for this simple reason. no cycles. and it just got left, even though *I* thought it was the coolest feature (i guess because i wrote it.. :) now that we have mouse events coming through the display filter, we could add gestures application-wide. hmm.. gestures could be as configurable as key bindings with little effort: gestures could simply generate special key strokes, and doug's 'keysequencetext' (or another text control) could simply add a gesture capture listener (already done) to allow gesture strokes to be inserted instead of key strokes. anyway.. small amount of work. big gain. i wish i wasn't so swamped with the boring stuff..
*** Bug 51199 has been marked as a duplicate of this bug. ***
Bug 51199 also discusses the Back and Forward keys on a laptop. Not sure if these generate key events or mouse events.
in answer to the question of "which event gets generated by non-standard button X?": it doesn't matter if the settings dialog is interactive. 1) click on "define shortcut for action X" 2) a dialog comes up. press any key combination / mouse key combination or even make a mouse gesture. the dialog captures it, and displays it as well as it can. e.g. maybe "button 4" appears, maybe something else ("unknown key #1"). but in any case, button 4 is now tied to the action. leave it to the system to deal with which exact event is generated, but do what the user expects. most games work this way (hence my reference to Quake3, there is a free download).. it has the advantage of being system-independent.
*** Bug 73239 has been marked as a duplicate of this bug. ***
*** Bug 63868 has been marked as a duplicate of this bug. ***
For a new user it is not clear what the effect of a double-click is for most of the views. The only way to find out is to actually try it. There should be an indication in the UI (e.g. the context menu or tooltip).....
*** Bug 27517 has been marked as a duplicate of this bug. ***
*** Bug 87232 has been marked as a duplicate of this bug. ***
The solution mentioned in comment 3 stopped working with IntelliPoint 5.0 and above. I tested Back and Forward mouse buttons with three versions of IntelliPoint with the following results: 4.1 Works 5.0 Doesn't work 5.2 Doesn't work Please increase priority of Back/Forward button support. Old IntelliPoint versions don't work with new mouse models and are not available for download anymore. Steve Northover mentioned that SWT now supports 4th and 5th mouse buttons, so supporting them in UI should not be a problem.
intellimouse 4.12 driver is available to download from: http://www.softwarepatch.com/utilities/intellimouse.html which for me ended up pointing to: http://download.microsoft.com/download/4/8/c/48ca781f-a1be-4cdc-8d97- dfc33535d4da/IP4_12EngALLMsi.exe in case somebody actually needs them as a workaround to the back/forward problem.
Unfortunately my Wireless IntelliMouse Explorer 2.0 is not supported by IntelliPoint 4.12. Please raise the priority of this issue to get it fixed in 3.1.
*** Bug 91151 has been marked as a duplicate of this bug. ***
Douglass, Chris - re comments #2, #4 and support for Mouse Gestures - Yes please! See bug 88986 https://bugs.eclipse.org/bugs/show_bug.cgi?id=88986
Mouse gestures are good, but they are much bigger feature than support for additional mouse buttons, which are already supported by SWT. It seems to make sense to split this bug into two - one for mouse buttons and another one for gestures.
*** Bug 99630 has been marked as a duplicate of this bug. ***
This enhancement request will soon celebrate its second birthday. Please consider it for 3.2.
I agree with comment 18 saying that this bug is about allowing binding to mouse clicks, the problem of mouse gesture being a different ("harder") request. It should be assigned to another number. Resolution of this bug would also resolve bug #106873 which IMHO is important too.
Moving Dougs bugs
Is there a timeframe for this bug? I have way to many buttons which are of no use ;-)
(In reply to comment #13) You can at least map the buttons to alt-left and alt-right again with the intellimouse 6.1 driver. I'm using 3.3M7
(In reply to comment #24) Do you have a recipe for Linux (Ubuntu Daper)?
I would also be very happy to see this feature implemented.
*** Bug 49815 has been marked as a duplicate of this bug. ***
If mouse buttons are added to the Keys preference page, there should also be a way to configure whether - the command should just be executed (e.g. when binding "Navigate > Back" to mouse button 4), or - mouse button 1 should be clicked and then the command should be executed (e.g. when binding "Navigate > Open Declaration" to mouse button 2). Furthermore, mouse clicks probably need more fine-grained activation scopes. E.g. Middle-click on a tab should close the part (implemented in bug 156792) but middle-click in a text editor should open the declaration and middle-click in a browser should open the link in a new editor. I think we should just go forward and hardcode the most-often requested defaults for now (bug 88788, bug 106873).
Seven years in the making... Please add this feature. It would be very nice.
Here are some hints: You need a MouseButtonBinding (similar to KeyBinding, derived from Binding) You need a TriggerSequence that's a MouseButtonSequence You need to represent the buttons in the in the keys preference page somehow, so they can be bound. i.e. they need to either be captured by the text field or filled in from the dropdown. You need to be able to ask the BindingManager for a TriggerSequeence that can look up the MouseButtonSequence to pick up MouseButtonBinding. You need a filter that can deal with those events and process them correctly ... see something similar to WorkbenchKeyboard (maybe an extra filter there). PW
(In reply to comment #30) That's a technical description, but before we put any work into implementing new infrastructure for an unclear problem statement, we first need real cases where the infrastructure will be used. As outlined in comment 28, handling of mouse clicks is different from handling of key strokes, and any plan for a new general infrastructure needs to give answers to those problems first. Like we hardcode mouse buttons 1 and 3 now, we should just to the same for the other buttons (bug 88788, bug 106873).
Since this is now 7 years in the making, maybe it needs to be de-scoped? I just noticed something in XCode 4: Three finger swipe left / right is forward / back. I am in heaven. That would be good enough for me. Note that back when I made this feature request, Macs didn't even have multi-finger gestures on the trackpad. Maybe if detecting buttons in the same UI as keyboard presses is too hard, you could just have a separate mouse buttons assignment preference pane? Making mouse button 3 or 4 equivalent to a keyboard shortcut surely can't be that hard?! Would work just as well. Add a new preference pane, call it Mouse Buttons, and allow some simple settings for the mouse buttons. If that can include trackpad gestures would be even nicer - but I realize those are a Mac-only thing.
(In reply to comment #31) > That's a technical description, but before we put any work into implementing > new infrastructure for an unclear problem statement, we first need real cases > where the infrastructure will be used. The main use case is to make mouse Back button work on Linux. On Windows there is a workaround based on remapping in IntelliPoint.
(In reply to comment #32) Please file a separate bug for gestures support. SWT added GestureListener in 3.7, and we should see if that's enough to support back and forward gestures. (In reply to comment #33) > The main use case is to make mouse Back button work on Linux. On Windows there > is a workaround based on remapping in IntelliPoint. Exactly. This doesn't need to be configurable, it just needs to work. I attached a patch to bug 88788 for this.
(In reply to comment #34) > Exactly. This doesn't need to be configurable, it just needs to work. I > attached a patch to bug 88788 for this. Thank you very much! I like pragmatic solutions.
A collegue uses IntelliJ and showed me the key bindings there - it's possible to define Mouse clicks, Wheel events etc. there to launch "commands" there. So it was very easy for him to change the zoom feature from keyboard short cut to a mouse shortcut. This is something IntelliJ is able to but eclipse not. I would appreciate if eclipse could do this too. Like M1, M2 etc. inside plugin.xml configurations a MOUSE_CLICK_LEFT, MOUSE_CLICK_RIGHT etc. could be used in text form to apply in plugin.xml too and not only at keyboard bindings on UI.
Same as @Albert: working with a colleague using IntelliJ and is has really good support for mouse bindings. Would really be a nice feature to add proper handling to Eclipse as well.
It's 2021 now. Such a relatively simple feature request to implement dynamic keybindings shouldn't be this difficult to organize. Just listen to any events thrown by https://docs.oracle.com/javase/8/docs/api/index.html?java/awt/event/KeyEvent.html and save type, buttons pressed + masks. You already have code matching everything to combinations. Just make the list that makes up the combinations dynamically configurable by the user by capturing inputs and putting that in the matching list. Since Java7 it's possible to listen to more than the 3 mouse buttons, https://stackoverflow.com/questions/7644842/how-can-i-use-the-back-and-forward-mouse-buttons-in-a-swing-application Having to switch between keyboard and mouse constantly when looking for a certain file, is very tedious when having to do this a lot of times. Currently, I have to use a third-party application like http://dvps.highrez.co.uk/downloads/XMouse_installed.htm?Platform=x64?version=2190200 to make my own key combinations, but I would find it more desirable to be able to configure this in eclipse directly.