Page MenuHome

Remove/Update "Emulate Middle Mouse" preference
Open, Confirmed, MediumPublic

Description

This task is to check if it is reasonable to remove the emulate middle mouse option.

Blender 2.7x didn't allow left-click-select and emulate middle mouse to be enabled at once, this never worked - it's just that in 2.8x we allow both options to be enabled at once with key-conflicts.

Since I don't use a touch-pad on macOS / ms-windows, I'm not sure how common it is that middle-click gestures are enabled without having to manually configure it.

Are there systems where using a middle-click still isn't practical?

Options could be:

  • Remove this preference.
  • Remove the keys that use Alt-LMB (means re-working the keymap in some places).
  • Use an alternative shortcut that doesn't conflict, eg: OSKey (Cmd / Super / Windows-Key).

    (By default this conflicts on Linux with many window-managers, these would need to be re-configured not to use Super-LMB).

Unless this is given some attention it's likely Alt-LMB will be used more, to the point Emulate-Middle-Mouse preference isn't useful and we'll need to remove or document all it's known limitations and accept Blender isn't fully usable with this enabled.


There are currently conflicts using with emulate middle mouse

  • Number Button Alt-Drag to change all other selected items T69053: Emulate 3 Buttons doesn't work with ALT Modifier key on UI buttons
  • Edit-Mesh: Edge-ring de-select isn't possible.
  • Alt-MMB-drag to change views.
  • Grease Pencil, Circle Primitive
  • Weight Paint Gradient
  • Loop select (Worked around with double-click, but not very convenient since selecting boundaries requires quad-click).

Here is a full list of potential conflicts in the default keymap.

Are we serious about resolving these or would it be better to drop this option?


From a search of the code:

cat release/scripts/presets/keyconfig/keymap_data/blender_default.py | \
    pcregrep "('LEFTMOUSE'|params.select_mouse|params.action_tweak|params.action_mouse).*alt\":"
("uv.select_loop", {"type": params.select_mouse, "value": params.select_mouse_value, "alt": True},
("uv.select_loop", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "alt": True},
("uv.select_loop", {"type": params.select_mouse, "value": 'DOUBLE_CLICK', "alt": True},
("mask.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True},
("mask.select_lasso", {"type": params.action_tweak, "value": 'ANY', "shift": True, "ctrl": True, "alt": True},
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "alt": True},
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True},
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": True},
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True},
("node.backimage_sample", {"type": params.action_mouse, "value": 'PRESS', "alt": True}, None),
("node.move_detach_links_release", {"type": params.action_tweak, "value": 'ANY', "alt": True}, None),
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "alt": True},
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True},
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": True},
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True},
("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "alt": True},
("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True},
("clip.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True},
("clip.select_lasso", {"type": params.action_tweak, "value": 'ANY', "shift": True, "ctrl": True, "alt": True},
("gpencil.annotate", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True, "key_modifier": 'D'},
("gpencil.annotate", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "alt": True, "key_modifier": 'D'},
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True},
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "shift": True, "ctrl": True, "alt": True},
("gpencil.select", {"type": params.select_mouse, "value": params.select_mouse_value, "alt": True},
("gpencil.select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "alt": True},
("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "alt": True},
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
("paint.weight_gradient", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
("paint.weight_gradient", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True, "alt": True},
("mesh.loop_select", {"type": params.select_mouse, "value": params.select_mouse_value, "alt": True},
("mesh.loop_select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "alt": True},
("mesh.edgering_select", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "alt": True},
("mesh.edgering_select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "ctrl": True, "alt": True},
("mesh.loop_select", {"type": params.select_mouse, "value": 'DOUBLE_CLICK', "alt": True},
("gpencil.primitive", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
("gpencil.primitive", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
("gpencil.primitive", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
("gpencil.primitive", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),

Details

Differential Revisions
D5682: Option to use OSKey for MMB emulation
Type
Design

Event Timeline

Campbell Barton (campbellbarton) triaged this task as Confirmed, Medium priority.

Maybe I am not quite sure I understand correctly, but everytime I travel, teach or use Blender somwhere else on the road, I am doing that on a MacBookPro, and I always use the EmulateMiddleMouseButton there. I would be completely lost without it.

I know that some users use this option because (cheap, old?) devices need a lot more pressure on the MMB scroll wheel.
Personally, I would prefer to remove this option because it causes many issues. Using a suitable external device is, in my opinion, in the end less painful.

For example, in the 3D view, it also breaks the currently free Ctrl-Alt-LMB that I use for viewport-roll.
And there is no reasonable way to fix that: https://developer.blender.org/T31392#765200

I on windows that on linux I have always used emulate middle mouse button both with the touchpad and with the tablet pen, and I use the combinations
alt + left click = rotate view
alt + ctrl + left click = zoom view
alt + shift + left click = pan view
alt + left click for scrolling in the ourliner and panels ...

for me these functions are essential, the rest I can't say ..

For trackpad and pen tablet usage I think this option is still important.

I don't think we can rely on middle mouse click being available. For pen tablets right mouse click is already more limited in what you can do efficiently, nevermind middle mouse click.

I've had a good experience using Spacebar as an MMB stand-in on laptops, re-mapping the standard actions (search, play animation, maximize area, etc) to double-click and using click-drag for rotating the viewport. I like enough that I use a similar keymap layering system on my desktop, as it lets me use Spacebar as a modifier key for LMB and RMB, too.

I have a fully functional middle mouse button and often use this, because it's imo more comfortable. I'm on rightclick select though

I use this option with all my devices - most modern mice don't have a real MMB, but a scroll wheel, which is really not very nice to press.

Grease Pencil, Circle Primitive

We have a tool for this

Weight Paint Gradient

We have a tool for this

Loop select (Worked around with double-click, but not very convenient since selecting boundaries requires quad-click).

We have a workaround as you say.

Having a tool for a feature isn't a great excuse for allowing conflicts, if someone is following a tutorial or a set of steps, they might not be able to perform the same steps.

You don't have to look far in the larger list of bindings to find issues that can't be worked around.

For example, with emulate-mmb, it's impossible to edge-ring-deselect with LMB-select, or lasso-select mask/clips with RMB-select.

Sequencer linked-select options also don't seem to have an alternative.

the logic wants blender should be totally functional with two buttons, and the third-middle button should be optional for those who "use them - enable them"

  • All the devices have 2 buttons
  • 3 buttons only some mouse

If the goal is to minimize the keymap impact, we could swap the right-click menus from press to click, use right tweak for panning, and set the modifier keys to swap between Move/Rotate/Zoom within the modals. We'd have to adjust the stencil controls for painting and sculpting, but we should be able to nudge things around and use Ctrl+Shift and Ctrl+Alt+Shift for displaced functions. It feels pretty smooth when you're using a tablet, with or without Confirm on Release.

Why not add an more key options to emulate Middle Mouse Button, such as using the "Fn" button for laptop users? Possibly with a dropdown of keys?

I think that the problem of using "Alt" and "Left Mouse" click will always be there, but it is better to have the option for users without a mouse, which my guess is probably many laptop users. There should be a warning on the option that informs the user that there may be keymap conflicts by using the option.

Not only laptop users benefit from middle mouse emulation, the first time i use blender with that option and a tablet it worked great, that was one of those things that remove presasure from my right hand, not need to claw a finger to keep a middle mouse pushed was great and it still is today i basically only work with table mouse its only for games at this point.
If you are wondering about how do i select without doing a claw with my index or middle finger, i use right click with the side of my thumb (on the pen) or usually ctrl+left click (pen tip) to lasso select
Emulate 3 mouse button its not a default option, shouldn't actually be a problem if some noob its following a tutorial, becaouse probably never new that the option existed in the first place.
By the way alt+changing a parameter also doesn't work properly, i really don't care about that shortcut just use contextual menu>copy to selected, just mentioned if you wanted to added to the list.

I've had a good experience using Spacebar as an MMB stand-in on laptops, re-mapping the standard actions (search, play animation, maximize area, etc) to double-click and using click-drag for rotating the viewport. I like enough that I use a similar keymap layering system on my desktop, as it lets me use Spacebar as a modifier key for LMB and RMB, too.

While I didn't try this - I have tried different kinds of input, in general they can work as a custom configuration, however I don't think it's reasonable to map mouse buttons to the keyboard entirely.


Why not add an more key options to emulate Middle Mouse Button, such as using the "Fn" button for laptop users? Possibly with a dropdown of keys?

the Fn key isn't seen as a modifier, we can't use it.

While having the option to select between multiple keys can work - it means we can have multiple options that conflict in different paces - which would be better to avoid.


If the goal is to minimize the keymap impact, we could swap the right-click menus from press to click, use right tweak for panning, and set the modifier keys to swap between Move/Rotate/Zoom within the modals. We'd have to adjust the stencil controls for painting and sculpting, but we should be able to nudge things around and use Ctrl+Shift and Ctrl+Alt+Shift for displaced functions. It feels pretty smooth when you're using a tablet, with or without Confirm on Release.

Differentiating RMB drag/click events work with Right-Click-Select. It's also likely to limit different kinds of interactions (during modal operators for example).

It can work for the 3D view but is unlikely to work well for event handling in general.

Since it seems there are enough devices that don't have access to MMB, we could use OSKey (Cmd/Super/Win) key, instead of Alt.

While we should continue to avoid using OSKey for other default bindings, an exception in this case would allow us to it for MMB-emulation without running into conflicts.

Pros:

  • Conflict free, MMB emulation can be fully supported without conflicts.
  • Simple to implement, can be used on all platforms.

Cons:

  • On Linux this is often used to move the window, although it can be configured not to.
  • On macOS it would mean you couldn't use Cmd for Ctrl when used with the mouse, this is a trade-off. All shortcuts can still be accessed because Ctrl can be used in those cases. This is already the case when Cmd use used by the window-manager.

Are there any other issues with this?

Emulate 3 Buttons doesn't work with ALT Modifier key on UI buttons

https://developer.blender.org/T69053

I always use the emulate. I don't see the problem while a lot of 3D software works with these keys. It's much more convenient with a graphics tablet. When you have several years of practice and tendonitis full of arms you will understand why the emulate is so important. the navigational functions are used every second and it is very tiring for the right hand to do gymnastics on 3 buttons and the worst is probably the middle button. I don't see a more practical position for the left hand than the alt shift ctrl.

Translated with www.DeepL.com/Translator

One of the mail uses of Emulate 3 Button Mouse is for graphics tablets where you actually often don’t have MMB at all, or even if you do, you cannot really use it for dragging. This makes removing this a non-starter, unless we provide a separate keymap especially for graphics tablets.

As already stated:

Since it seems there are enough devices that don't have access to MMB, we could use OSKey (Cmd/Super/Win) key, instead of Alt.

Any feedback on this?

There is a problem I would like to point out, there are some stupid keyboards (especially on laptops) that have the key lock for the combination of keys that are not ctrl or alt or shift + mouse movement ....
for example if I hold down "A" and I move the mouse, this doesn't work (especially the touchpad) ...
So the combinations Alt or ctrl or shift are essential ...

Some keyboards block the touchpad if you press space ...
(combination widely used in 2d drawing programs)
Ad don't even allow the classic wasd that is used to play video games.
I know it's a very mangy thing ... but I wanted to make it clear that these problems exist.

Some stupid keyboards / touchpads don't even allow you to disable "this function."

As already stated:

Since it seems there are enough devices that don't have access to MMB, we could use OSKey (Cmd/Super/Win) key, instead of Alt.

Any feedback on this?

If I read your suggestion correctly this is only OSKey + mouse move? as I in it won't stop cmd+c, cmd+v etc. working - I think this is a good compromise - doesn't the OS Key open the start menu on Windows?

If I read your suggestion correctly this is only OSKey + mouse move? as I in it won't stop cmd+c, cmd+v etc. working - I think this is a good compromise - doesn't the OS Key open the start menu on Windows?

It would be OSKey-LMB (instead of Alt-LMB).

If I read your suggestion correctly this is only OSKey + mouse move? as I in it won't stop cmd+c, cmd+v etc. working - I think this is a good compromise - doesn't the OS Key open the start menu on Windows?

It would be OSKey-LMB (instead of Alt-LMB).

For touchpads, a modifier key that works without LMB would be much more convenient; especially for touchpads with integrated mouse buttons it can be very hard to press the mouse button and move the cursor at the same time. Also multitouch gestures (as already enabled on macOS) would obviate the need for using a key combination most of the time for many touchpads.

Using the OSkey is a no-go on Windows. It breaks convention and produces unwanted behavior on key release, Suppressing that behavior would get messy, interfering with expected OS behavior. The OSkey is in a great position, but it comes with a ton of baggage (on Windows).

Is the goal to create a key combo that emulates the middle mouse button, or to create a keyboard layout for users that don't have a middle mouse button? I've realized that my suggestions have been targeting the latter, and they don't really solve the former.

We intentionally changed macOS to use cmd key to get more standard keyboard shortcuts, it would be unfortunate to give that up. Conflicting with default operating system configuration to move windows on Linux is also problematic.

I'm not convinced this is a pressing issue that we need to solve in a different way, that's it's worth the effort and pain of shaking things up. Yes it's a bit messy and it's not ideal that some functionality is not available with an easy shortcut when using middle mouse emulation. But what we have now is also generally usable.

We just did a lot of keymap changes in 2.80, I'd rather postpone this kind of change that affects commonly used shortcuts for many users.

Using the OSkey is a no-go on Windows. It breaks convention and produces unwanted behavior on key release, Suppressing that behavior would get messy, interfering with expected OS behavior. The OSkey is in a great position, but it comes with a ton of baggage (on Windows).

From looking into the WIN32 API, it looks possible to handle the windows key events, suppressing the start menu when used to emulate MMB.


We intentionally changed macOS to use cmd key to get more standard keyboard shortcuts, it would be unfortunate to give that up.

This could be done so it only impacts Ctrl-Click events (when MMB emulation is enabled). Nearly all shortcuts using Cmd would still work.

Conflicting with default operating system configuration to move windows on Linux is also problematic.

Agree, not great. OTOH, the current situation is quite bad too.

I'm not convinced this is a pressing issue that we need to solve in a different way, that's it's worth the effort and pain of shaking things up. Yes it's a bit messy and it's not ideal that some functionality is not available with an easy shortcut when using middle mouse emulation. But what we have now is also generally usable.
We just did a lot of keymap changes in 2.80, I'd rather postpone this kind of change that affects commonly used shortcuts for many users.

Whatever we do in this case - its a non-default keymap option, so having an alternate way to access MMB emulation may not be such a big change.

If we choose not to *solve* this, the documentation for MMB emulation should state something to this effect:

Middle mouse button emulation gives reduced functionality, making actions such as editing multiple object values at once and some selection operations impossible. For all operations to be accessible, use an input device with a middle mouse button.
... list all operations which can't be accessed w/ MMB-emulation.