Box/lasso select tools (in both 3D and 2D views) consume events they shouldn't be #82985

Closed
opened 2020-11-25 02:04:38 +01:00 by Stanislav Blinov · 9 comments

Blender Version
Broken: since 2.80?

Short description of error

With the default keymap, the active box select and lasso tools consume mouse clicks if a non-modifier key is held.

Practical example: in mesh edit mode, if selection mode is switched with a hotkey (1, 2, 3) and mouse is immediately clicked, the click often doesn't go through since it is often the case that the hotkey is not yet released by the time mouse is clicked.

One can circumvent this by manually editing keymaps for 3D/2D view Box/Lasso tools and adding handlers for mouse Release events. However, that is a crutch. These tools should not be blocking clicks in the first place, nor require special setup from the user.

Exact steps for others to reproduce the error

Enter edit mode on the default cube and try to quickly switch between selection modes using the 1, 2, 3 hotkeys and click-selecting the relevant elements. If done quick enough, you will notice that clicks often don't register.

In keymap preferences, 3D View -> Mesh, 3D View Tool: Select Box, add a new entry for Left Mouse Release with operator view3d.select. After this the tool behaves as expected.

I think the keymap solution is impractical though: it would involve recreating all click-selection functionality in each of these tools, with modifiers like shift and ctrl, all around the Release event. A better event handling in the tools themselves is required.

**Blender Version** Broken: since 2.80? **Short description of error** With the default keymap, the active box select and lasso tools consume mouse clicks if a non-modifier key is held. Practical example: in mesh edit mode, if selection mode is switched with a hotkey (1, 2, 3) and mouse is immediately clicked, the click often doesn't go through since it is often the case that the hotkey is not yet released by the time mouse is clicked. One can circumvent this by manually editing keymaps for 3D/2D view Box/Lasso tools and adding handlers for mouse **Release** events. However, that is a crutch. These tools should not be blocking clicks in the first place, nor require special setup from the user. **Exact steps for others to reproduce the error** Enter edit mode on the default cube and try to quickly switch between selection modes using the 1, 2, 3 hotkeys and click-selecting the relevant elements. If done quick enough, you will notice that clicks often don't register. In keymap preferences, 3D View -> Mesh, 3D View Tool: Select Box, add a new entry for Left Mouse Release with operator view3d.select. After this the tool behaves as expected. I think the keymap solution is impractical though: it would involve recreating all click-selection functionality in each of these tools, with modifiers like shift and ctrl, all around the Release event. A better event handling in the tools themselves is required.

Added subscriber: @Stan_Pancakes

Added subscriber: @Stan_Pancakes

Added subscriber: @rjg

Added subscriber: @rjg

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'

This is not a bug. Keeping another key pressed and clicking with the mouse is a different key binding and therefore not the same action. Selecting a e.g. a vertex require only the mouse button to be pressed. You can observe the same behavior when picking a key that is not used in any shortcut, keep it pressed and attempt to click with the mouse.

This is not a bug. Keeping another key pressed and clicking with the mouse is a different key binding and therefore not the same action. Selecting a e.g. a vertex require only the mouse button to be pressed. You can observe the same behavior when picking a key that is not used in any shortcut, keep it pressed and attempt to click with the mouse.

I understand why this happens, it's just that it's really disrupting in this particular case. You can't create e.g. a "1 + left mouse" binding either, so there doesn't even seem to be a way to overcome this (save for scripting a custom selection operator, yuck). Or can you?

I understand why this happens, it's just that it's really disrupting in this particular case. You can't create e.g. a "1 + left mouse" binding either, so there doesn't even seem to be a way to overcome this (save for scripting a custom selection operator, yuck). Or can you?

You could add one, however you can't have multiple shortcuts activate at the same time. This falls pretty clearly into the improvement suggestion / feature request category. While this may be nice to have, it is unfortunately off-topic on the bug tracker.

You could add one, however you can't have multiple shortcuts activate at the same time. This falls pretty clearly into the improvement suggestion / feature request category. While this may be nice to have, it is unfortunately off-topic on the bug tracker.

Upon further investigation this appears to be tool-specific. If you have the box or lasso select as active tools (from the toolbar, though it also applies to modal ones), holding any key other than modifiers while clicking indeed consumes the click without action. But if you switch to Tweak tool, selection occurs on click even if you hold 1, 2, or any other (even unassigned) key.

Upon further investigation this appears to be tool-specific. If you have the box or lasso select as active tools (from the toolbar, though it also applies to modal ones), holding any key other than modifiers while clicking indeed consumes the click without action. But if you switch to Tweak tool, selection occurs on click even if you hold 1, 2, or any other (even unassigned) key.
Stanislav Blinov changed title from Inconsistent UX when using hotkeys for mesh edit mode switching to Box/lasso select tools (in both 3D and 2D views) consume events they shouldn't be 2020-11-25 15:10:55 +01:00

@rjg Please reassess.

@rjg Please reassess.

Alright, after looking at the code I can understand the problem (and the scope of it) much better now. Ouch.
Additionally, the aforementioned solution via Release binding isn't practical at all as it creates more problems than it solves.

Alright, after looking at the code I can understand the problem (and the scope of it) much better now. Ouch. Additionally, the aforementioned solution via Release binding isn't practical at all as it creates more problems than it solves.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#82985
No description provided.