Right-Click Navigation (WIP)

icon_right-click-navigation2
I like to set up Blender to use the right mouse button for navigation, instead of using middle mouse. This is no small undertaking, so I decided to clean up my 2.8 config and share it as an add-on for anyone else who wanted to use it: Right-Click Navigation. I’ve seen a few similar keymaps around, but mine has these features:

  • It’s not a full keymap, it’s a smaller patch on top of your existing keymap. It leaves many of your hotkeys alone (depending on your config).
  • It’s an add-on, which means it’s easier to install / disable / uninstall, and it doesn’t mess up your preferences. If you disable or uninstall it, the RMB nav hotkeys go away.
  • It works in both 3D and 2D editors, so you can pan UVs, nodes, etc, using RMB drag.
  • It’s fine-tuned to account for all context menus / panels, and for other MMB / RMB ops.

Basic hotkeys:

  • 3D editor rotate: RMB drag
  • 3D editor pan: Shift+RMB drag
  • 3D editor zoom: Ctrl+RMB drag, or MMB wheel scroll
  • 2D editor pan: RMB drag (some use Shift+RMB drag, see next post)
  • Context menus / panels: Alt+RMB click (some use default RMB click, see next post)
  • Place 3D/2D cursor: Ctrl+Shift+Alt+RMB click
  • (see more advanced hotkeys + notes in the second post in this thread)
    .
Installation instructions:
  • (This add-on doesn’t make permanent changes to your prefs, but if you want to be extra careful, back up your userprefs file first, just in case. This is still a WIP.)
  • Before you install, make sure you’re using Blender’s “Left-click select” mapping: in Preferences > Keymap > Preferences section > Select With: Left.
  • To install: in Preferences > Add-ons > hit the Install button. Find the add-on PY file, install it. Enable it by checking it on.
  • Wait a second or two while Blender registers the hotkey updates. (You will also need to wait a little on every boot.)
  • Try it out. If RMB nav isn’t working, see the second post in this thread for help.

This is still a work in progress, so let me know if you have any problems / feedback.

4 Likes

Advanced stuff / troubleshooting

How to disable / uninstall
  • Uncheck (or hit the Remove button) in the add-on listing in your Add-ons list, then close and restart Blender.
  • Your earlier keymap should now be exactly as you had it before you enabled RMB nav.
If RMB nav isn't working
  • Note that this is for Blender 2.8+, not 2.7x.
  • Wait a few seconds after installing / enabling it, or after starting Blender. Try again.
  • If that doesn’t work, another one of your add-ons’ hotkeys or one of your own custom hotkeys might be hijacking one of mine. Change the other add-on’s hotkeys or yours, if you know how. Or change mine in the PY file.
  • If that still doesn’t work, uninstall the Right-Click Navigation add-on in Preferences (hit the Remove button). Open the original PY file for the script, and look for the line “delaySeconds = 1” near the top. Change that 1 value to something higher (2, 3, or 4 or more). Install again, wait, and try RMB nav again. Rinse and repeat.
Additional hotkeys / notes
  • (In addition to the basic ones listed in the first post)
  • 3D editor dolly: Ctrl+Shift+RMB
  • 3D editor center object under cursor: Shift+Alt+RMB click an object.
  • 3D editor ortho jump: Shift+Alt+RMB drag leftward, rightward, upward, or downward, then release.
  • Stencil paint hotkeys have been reassigned to MMB, away from RMB. Same modifier shortcuts: MMB, Shift+MMB, Ctrl+RMB.
  • For any editor that has a timeline (dopesheet, NLA, etc), I retained the default Shift+RMB hotkey to move to the selected frame. You can pan with RMB drag.
  • Again for timeline editors, for the ones that have an channel list stack down the left-hand side, I retained the default RMB hotkey for context menus, along with adding Alt+RMB as an option. To pan these channel lists, use Shift+RMB. (I might change this behavior later for consistency, haven’t tried yet.)
  • I set up the Properties and Outliner editors use Shift+RMB to pan (instead of plain RMB), because there are so many UI elements in each editor that work better with default RMB to bring up a context menu, so Shift+RMB for pan seemed like the better way to go. (I might change this behavior later for consistency, haven’t tried yet.)
  • Mask mode vertex drawing ops still use the default RMB-based hotkeys, should work fine.
  • Mask mode 2D cursor placement uses the default Shift+RMB hotkey; I can’t get my custom one to work.
  • Console editor: RMB nav doesn’t work here
  • I tried to remap some of the more obscure MMB / RMB ops so that MMB was swapped for RMB, but this didn’t always make sense. In general, for a bunch of modal ops, MMB is now “cancel” (where this was assigned to RMB previously), and RMB is now a secondary function. For example, while using the Knife tool, you can rotate the viewport using RMB drag, and cancel using MMB.
  • I’m still testing and fine-tuning some of the more obscure MMB / RMB reassignments.
Misc notes
  • The built-in delay that I’ve mentioned is meant to sidestep a problem Blender apparently has with loading its own keymaps in time, and with custom modal keymaps not registering correctly. I built in a delay to give Blender time to load its own stuff, before applying my hotkeys.
  • I’m not a dev, just learning as I go, so if more advanced devs see stuff in my code that could be done better, feel free to let me know.
  • Let me know likes / dislikes if you test it.

Great add-on!
The only inconvenience I noticed is in shader editor when using node wrangler addon, than you can’t “lazy connect” nodes with Ctrl+RMB, its kinda annoying considering how often you connect nodes with that. Maybe you can consider remapping pan view in shader editor or adding option do disable in addon it self, thanks.

Yeah, Node Wrangler is a tough one, because it interferes with a lot. I was going to suggest uninstalling my add-on and dropping my PY file into your Blender install location’s scripts/startup folder, which normally makes it so other add-ons’ hotkeys supersede it (like Node Wrangler’s), but it’s not working for me for some reason.

All right, here’s an updated version that gets rid some of the RMB nav hotkeys for node view. Uninstall my earlier version using the Add-Ons UI (hit the Remove btn), close and restart Blender, and reinstall this again:
z_addon_RMB_nav_patch-higgsas-01.py (26.2 KB)

Let me know if you run into other stuff.

1 Like

I’ve been using RMB tweak to rotate the viewport too for quite some time and I love it!
As for Alt-RMB to use context menus: have you tried setting it from RMB-press to RMB-click? This enables you to use drags and clicks at the same time without modifiers. Also, I use Ctrl-Tweak-RMB to cycle through the viewport perspectives, Ctrl-Tweak-North for Top View, etc. Maybe that’s a thing for you too?

1 Like

Dang, I meant to try playing with click vs press to see if I could keep RMB as the default context menu hotkey (and simplifying the keymap as a result). Thanks for inadvertently reminding me … I must’ve forgotten about it and got caught up in cleaning up the keymap I already had and dumping it on here as an add-on. :face_with_raised_eyebrow: I’m glad to hear the setup works, so I’ll give that a shot. If you or anyone else has any other ideas, I’m definitely open to trying them out and stealing them.

Re: the ortho jumps, yup I mapped those to Shift+Alt+RMB tweak in my current setup.

1 Like

@bassig So I’ve tried every combination of RIGHTMOUSE, EVT_TWEAK_R, PRESS, CLICK, and CLICK_DRAG, across navigation ops and context menu calls, and no combo works reliably for me. Do you have your config in 2.8 or 2.79? Can I ask what exactly you assigned to viewport nav (rotate, pan, zoom), and what you assigned to context menus?

Rotate: RMB-Tweak-Any
Pan: Middle-Tweak-Any
Zoom: wheel up / wheel down

All the context menus in the 3D viewport are assigned to RMB-Click.
2.8_rmb_keyconfig.py (144.3 KB)

Were there any right-click lovers here?
It’s a great add-on, but it’s too sad that right-click is often “cancelled” in other add-on operations and it interferes with many add-ons …

In 2.79 I also changed ‘RIGHTMOUSE’ when the camera operation related event type in py is ‘MIDDLEMOUSE’.
And it was hard for the add-on updates to come and take time to adjust.

After all 2.80, I decided that it would be easier if I got used to the default camera operation, and I didn’t mess with the event types in py.
I could only get used to the camera operation of MIDDLEMOUSE …

This is the best mod ever! I think the community is unaware of how much time saving this is.
It takes a few more milliseconds to do the same with the left click using 3 button emulation, but in the end of the day is a lot of minutes and hundreds of less presses with both the left hand and pointer finger, saving the stress for the really important clicks.

Maybe you should change the name since people may think that it’s related to the “Left click select” thing, maybe something like “Faster navigation controls” or “Navigate with right click faster”

I’m very thankful for this, good for my trackball, good for my wacom, and good for my mouse too :slight_smile: