- Home /
Configuring Mouse Buttons in Unity Editor
I'm new to Unity and I'm trying to get the editor setup to my satisfaction. I've got a 3 button mouse with a scroll wheel. Currently while the Hand button "Q" is selected, both my mouse wheel and right button will zoom the Scene Area. Since this is redundant, I would like to assign the right mouse button to rotate so I don't need to use the Alt button on the Keyboard.
This seems like it should be an obvious thing to change but I can't find where to change it.
Thanks,
Geoff
Answer by Eric5h5 · Mar 05, 2010 at 12:29 AM
Unity doesn't have any way of assigning mouse buttons or keys for these actions. Everything you can change is in the preferences under the Keys tab.
@Eric5h5, I was about to open another quesiton when I found this. But still I think: how is it possible that the strumpy shader editor added a custom right mouse button menu? Is that a special case?
Hi, this seems wrong so there should be an extension that handles this natively by now. Care to take another whack at it?
No, just have a look at the source code of the SceneView. In this line for example they have hardcoded the right mouse button.
What you can do is kinda hack your way around the default behaviour by implementing your own and suppressing the default behaviour. However this does not necessarily work in all cases as it depends on the execution order of certain things. If the editor processes the events before your own code you can't really prevent the default behaviour.
Have a look at this editor window i made some time ago that basically "replaces" the FPS controls in the editor when "enabled". This allows you to specify a custom movement speed multiplier.
However there's no "native" way of changing most of the internals. Only those things which are actually configurable. For example the movement keys of the default behaviour are "Pref$$anonymous$$eys". Pref$$anonymous$$ey is just a helper class around EditorPrefs where the actual settings are stored
Answer by mindsize · Aug 29, 2020 at 05:45 PM
This is a real bummer. I'm coming from Blender and the just learning to navigate the viewport feels so backwards. I have to unlearn all of my current habits. Do people that work in Unity remap other 3D programs to match the Unity controls, or do they just learn to use two navigation systems? I feel like I won't be as efficient if I try and remember to very different ways to get around the viewport.
Your answer
Follow this Question
Related Questions
Disabling Mouse Wheel Clicking in Scene Window 0 Answers
Is there a way to remove an IDE option from the external tools, external editors drop down 0 Answers
Zooming with a mac one button mousec? 5 Answers
Invert movement in editor? 0 Answers
How to fix mouse click and drag hang in Unity 5.2.3.p2 OSX 1 Answer