Page MenuHome

Check some special keys in wm_eventmatch
AbandonedPublic

Authored by George Vogiatzis (Gvgeo) on Oct 13 2021, 2:55 PM.

Details

Reviewers
None
Summary

This patch checks if the , CapsLock and Space keys are pressed, to prevent keymaps that do not use them as modifiers to execute.

Problem
Any regular key used as a modifier, gets ignored when deciding which keymap to execute. This way keymaps that do not have a custom modifier are executed even if there is one pressed.
Example using Space as middle mouse button emulation: In sculpt mode, Space+left mouse button will start sculpt instead of rotate view. (Note: Sculpt will cancel quickly, cause of bug addressed in D12863)

Cause
Currently customs modifiers are ignored to allow key queuing for fast workflow.
E.g. Quickly select all and move. Can press A and then G before lifting A.

Solution
Only consider some custom modifiers that should not be an issue in the current workflow, and improve the use of them as modifiers.

Limitations

  1. Only the keys specified can be freely used as keymodifiers.
  2. May affect speed in parts of workflow. e.g. Play-pause(Space) and object mode () in quick succession (if keys press overlap).

Alternative
An other option is to consider all keys. This would improve the use of all keys as custom key modifiers; but probably would cause issues in workflow speed, when keys overlap.


Related but not part of this patch: Repeating keys cause some issues in execution of keymaps, which is partially addressed in D12863; but I was not able to completely pinpoint this issue. The keymap (I'm aware of) that will still have problem is view3d.view_center_pick, when used with Space, Alt and left mouse button key combination set.

From a couple of searches cannot find a bug report for this, or any talk about this issue. As such, User Interface also need to review and approve this change.

Motivation
Use of Space as middle mouse button emulation. The and CapsLock were included to allow more freedom in keymaps creation.

Diff Detail

Repository
rB Blender

Event Timeline

George Vogiatzis (Gvgeo) requested review of this revision.Oct 13 2021, 2:55 PM
George Vogiatzis (Gvgeo) created this revision.

Without this patch is impossible to properly use space to rotate the view, when in sculpt, paint mode etc.

Can test this patch with this keymap.

Please don't assign entire modules as group reviewers. Tag the patch (in the 'tags' field) with the appropriate modules, instead. I've just done this for you.

About the patch, please follow the ingredients of a patch. The description is missing some context. If I understand it correctly, it considers , CapsLock, and Space as modifier keys. Was this change already approved by anyone from the User Interface module? Was there a bug report about this?

Thanks for letting me know, I was not aware of this spam issue.

Also improved the description, should be fine now.

There isn't much interest for this.