Remapping the Middle Mouse Button to Right Mouse Button [2.80]

Hello,

Is there any easy way to switch the functions of the MMB and RMB?
I come from Rhino and I find it much convenient to have the Right Mouse Button doing the viewport navigation.
I know it might be weird, but I work on a tablet and it’s much easier to keep the basic navigation, and not load scripts constantly between the two programs.
I’ve looked into the Input menu, but there are a ton of modifications, and switching some that seem obvious, is not doing the job.

It would be cool to have a general option to make the switch as Left-Right MB click to select.

Just asking if there is an easier way to do this, instead of going to the Input panel and switching each input one by one.
Rhino has the option the generally switch the viewport manipulation between the two, so I’ll be switching there.

2 Likes

In the Input section drill on the right into the 3d view settings, then into the 3d view (global). Look for the rotate, pan, dolly and zoom settings.

/Nathan
Your friendly Rhino dev.

1 Like

Hey @jesterKing, I know you from the Rhino forums :slight_smile:

I’ve remapped all of those, but then the middle mouse button doesn’t do anything, and the right mouse button still opens the Object context menu.
Then I’ve searched for anything I could find regarding right mouse button and remapped it to MMB and vice-versa, but the right mouse button still does the same.

IDK. I’ll just swap the behaviour in Rhino, and adapt to it.

Thanks.

@ANDhitecture, when you change the bindings for a key you will have to go through the entire keymap to see where there might be conflicts - like the RMB in Object Mode for the 3d view.

Here a beginnings of a keymap for Rhino-style navigation in object mode

The repo is a public one, so calling on all Rhino + Blender users to contribute to this keymap.

Edit: I pushed changes with the mesh context menu also remapped (now on ctrl+alt+shift+RMB), so RMB rotate in 3d view in edit mode is possible.

2 Likes

I think I did. I went one by one. Maybe not carefully enough.

The “beginnings”? This is practically a full set. Thanks! I’ll try and contribute to as I find stuff.

Things I didn’t test are the other modes in 3dview: sculpting, grease pencil, weight painting, etc. You probably could just open the .py file in Vim (or any other less powerful editor :wink: ) and search for all occurrances of RIGHTMOUSE - you can also use the search menu in the Input keymap editor of course (set to keybinding, then enter right mouse for all cases that are bound to RMB).

I’ve got myself one of the 3D Connexion 3-button cad mice, which allows to remap the middle button (seperate from the scroll button per-app, so like you, I use Rhino daily and it’s been pricey, but great investment.

https://www.3dconnexion.co.uk/nc/products/cadmouse-product-line.html

I am sure that there may be cheaper gaming mice that allow to remap buttons per-app.

I used to have a SpacePilot Pro, but some uninvited guest thought he should loan it without ever returning it back :confused:

It is indeed great, but I never liked the 3dmouse app from 3dconnexion. I always used it with raw data input in Blender, where I participated in getting the NDOF-buttons all bindable directly from in Blender. Also, while great advice on the hardware side it doesn’t help getting a Rhino keymap for the regular mouse+keyboard combo done :wink:

I have a 3DConnextion SpaceMouse Compact. I loved it until I tried working with a pen and tablet.
That changed my complete workflow. Now I only work with the pen, the 12 shortcut buttons on the tablet and a Num Pad.
I’ve tried including the 3D mouse in my workflow after, but I find it distracting now, since the pen does the navigation in the viewports much more precisely.

Also, a tip - my mouse is A4 tech - Bloody ML160. It’s ugly as hell but this is THE additional shortcut key mouse. If you are looking for a mouse with many buttons this is the one to go. I have had it for more than 5 years and is still working perfectly, software is kept to date and also the software allows you to completely configure everything.

@jesterKing I was thinking the same thing - to search for RMB instances and swap them.
And I think there will be interference in sculpting mode cos some commands overlap. I don’t know exactly. It’s something in the back of my mind.
I’ll test it out in depth when I get to a new project where Blender will be incorporated.

@jesterKing, you’re right. I also had a look through at some point for proper reconfig through the extensive hotkey editor, but thought it would be easier to invest in hardware

@ANDhitecture, looks like a nice mouse, but probably takes a while to program it.

I was referring to these mice from 3d connexion, which have just a few buttons to reporgram, but most importantly they have a dedicated middle button that can modified per app:

Clearly, this is overly simple compared to gaming mouse, but the tracking is also amazing.

Anyways, it would be great to see your endeavours of proper right-click pan/rotate :slight_smile:

I found this suggestion on right click select, which seems pretty relevant. Maybe you can voice your opinion there as well.

image

I committed several tweaks to the keymap. curve edit mode should now work fine with Rhino-style view navigation.

Also remapped Set 3D Cursor away from Shift-LMB, since that interfered with selection extension. Set 3D Cursor is now under Shift-Ctrl-Alt-LMB.

1 Like

Hehe, I’m the one who made that earlier suggestion on blender.community, long ago.

Anyway, I wanted to share my own right-click navigation setup, in the form of a lightweight add-on. It modifies mostly viewport- and editor-related navigation hotkeys, and some MMB / RMB assignments that get caught up in the crossfire, and leaves your other hotkeys alone. If you disable it or uninstall it, the custom hotkeys go away. Give it a shot:

Hi All,

I had a keymap as well, but I find it too tedious going through all settings to fish out this type of swap.

Instead I went in C:\Program Files\Blender Foundation\Blender 3.0\3.0\scripts\presets\keyconfig
Duplicated the “Blender.py” to "Blender_Rhino.py"and edited line 290

and in folder “keymap_data”
Duplicated the “blender_default.py” to “blender_rhino.py” and swapped all “MIDDLEBUTTON” and “RIGHTBUTTON” instances. A total if 97 swaps.

Blender_Rhino.py (11.7 KB)
blender_rhino.py (381.0 KB)

Clipboard-1

Clipboard-2

1 Like

Honestly, I just grabbed a 5 button mouse from Razer…and that gives you to not only re-map L>R will add the function to remap a button to another program or in my case Remap the Scroll Click to button 4 on the thumb side…far better and smooth to work with for me anyways…

Here my basic Blender => Edit => Preferences => Keymap, to keep things feels like in Unreal Engine:

// 3D View (Global)
view3d.rotate (middle, press) => (right, click drag) // rotate view
view3d.move (middle, press, shift) => (middle, click drag) // pan view
[new] view3d.view_center_cursor => (middle, click) // center view to 3d cursor

// Also replace all of these:
wm.call_menu (right, press) => (right, click) // context menu object mode, editing mode.
wm.call_panel (right, press) => (right, click) // context menu sculpting, painting…
view2d.pan (middle, press) => (right, click drag) // shader background move