Key modifier(custom hotkey) does not trigger on a proper priority level. #44349

Closed
opened 2015-04-11 07:40:07 +02:00 by Blendy · 14 comments

System Information
Windows 7 64bit OS & AMD HD6770

Blender Version
Broken: (2.74 and previous versions)
Worked: (not sure, I just started using Blender since 2.63.)

Short description of error
When I bound "S key"+"right mouse" as view3d.zoom operator hotkey (It's Softimage style viewport navigation), the S key(as a keymodifier) does not take same priority as Ctrl, Shift and Alt key have. The problem is, for example, I wrote a custom python operator as a new selection method and bound "right mouse" as its hotkey, then, I attempted to zoom the 3d view by press "S + right mouse", Blender firstly only triggered the custom selection operator I wrote but couldn't zoom the 3d view as I supposed to. Whereas, when I bound "Alt + right mouse" as zoom 3d view hotkey, it worked properly. Maybe few people use Softimage style viewport navigation layout in Blender, so this problem was not so noticeable. I really hope you can fix it, and thanks for keeping Blender awesome :)
.
Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps

**System Information** Windows 7 64bit OS & AMD HD6770 **Blender Version** Broken: (2.74 and previous versions) Worked: (not sure, I just started using Blender since 2.63.) **Short description of error** When I bound "S key"+"right mouse" as view3d.zoom operator hotkey (It's Softimage style viewport navigation), the S key(as a keymodifier) does not take same priority as Ctrl, Shift and Alt key have. The problem is, for example, I wrote a custom python operator as a new selection method and bound "right mouse" as its hotkey, then, I attempted to zoom the 3d view by press "S + right mouse", Blender firstly only triggered the custom selection operator I wrote but couldn't zoom the 3d view as I supposed to. Whereas, when I bound "Alt + right mouse" as zoom 3d view hotkey, it worked properly. Maybe few people use Softimage style viewport navigation layout in Blender, so this problem was not so noticeable. I really hope you can fix it, and thanks for keeping Blender awesome :) . **Exact steps for others to reproduce the error** Based on a (as simple as possible) attached .blend file with minimum amount of steps
Author

Changed status to: 'Open'

Changed status to: 'Open'
Brecht Van Lommel was assigned by Blendy 2015-04-11 07:40:07 +02:00
Author

Added subscriber: @Rays-Lv

Added subscriber: @Rays-Lv
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Did you assign the S-key using this field? : modifier_key_bug.png

Did you assign the S-key using this field? : ![modifier_key_bug.png](https://archive.blender.org/developer/F161656/modifier_key_bug.png)
Author

In #44349#302484, @JulianEisel wrote:
Did you assign the S-key using this field? : modifier_key_bug.png

Yes,I exactly assign the S-key using this field. And it works perfectly in most circumstances, even Blender's native select operator written by C-language works properly with this key. Only python Operators will take higher priority over this key. So it doesn't make good sense, it's supposed to be a bug.

> In #44349#302484, @JulianEisel wrote: > Did you assign the S-key using this field? : ![modifier_key_bug.png](https://archive.blender.org/developer/F161656/modifier_key_bug.png) Yes,I exactly assign the S-key using this field. And it works perfectly in most circumstances, even Blender's native select operator written by C-language works properly with this key. Only python Operators will take higher priority over this key. So it doesn't make good sense, it's supposed to be a bug.
Member

So you have an py-written operator and you want it to be called on RMB and you want the zoom operator to be triggered on S+RMB, right? Would be useful to see your script then, at least a simplified version of it, so I can test on my own

So you have an py-written operator and you want it to be called on RMB and you want the zoom operator to be triggered on S+RMB, right? Would be useful to see your script then, at least a simplified version of it, so I can test on my own
Author

In #44349#304318, @JulianEisel wrote:
So you have an py-written operator and you want it to be called on RMB and you want the zoom operator to be triggered on S+RMB, right? Would be useful to see your script then, at least a simplified version of it, so I can test on my own

Actually, it doesn't depend on what script written in Operator. It's like that ANY python operator causes the problem, even a blender native python Operator causes this problem, for example, like "Select All Toggle" operator(A key by default), you can still press A to toggle select all objects while S (S had already been set as a key modifier as I said previously) is being held. Whereas, while you're holding Alt or Shift or Ctrl, you're not able to toggle select any more, it's working properly. The key modifier should've been working that way as Alt, Shift or Ctrl do.

It seems that Blender haven't offered an event which can test if a key modifier is held, there are only event.alt, event.shift, event.ctrl in python APIs. Recently, I dug into python coding in blender a little bit, and found a way to test if S is held during the whole runtime of blender. This can be used for avoiding that operators conflict issue. But it's still a workaround, as dev team, you should implement it in some more proper way. I wrote a "testing if SKey is held" python script sample, it's based on a python template in blender.
.blend file here: test_if_SKey_held.blend
You can play with it, simply run the script in the text editor, then press S key a few times in 3d view, you'll see the difference. Hope it's helpful for you team to a proper solution soon.

> In #44349#304318, @JulianEisel wrote: > So you have an py-written operator and you want it to be called on RMB and you want the zoom operator to be triggered on S+RMB, right? Would be useful to see your script then, at least a simplified version of it, so I can test on my own Actually, it doesn't depend on what script written in Operator. It's like that ANY python operator causes the problem, even a blender native python Operator causes this problem, for example, like "Select All Toggle" operator(A key by default), you can still press A to toggle select all objects while S (S had already been set as a key modifier as I said previously) is being held. Whereas, while you're holding Alt or Shift or Ctrl, you're not able to toggle select any more, it's working properly. The key modifier should've been working that way as Alt, Shift or Ctrl do. It seems that Blender haven't offered an event which can test if a key modifier is held, there are only event.alt, event.shift, event.ctrl in python APIs. Recently, I dug into python coding in blender a little bit, and found a way to test if S is held during the whole runtime of blender. This can be used for avoiding that operators conflict issue. But it's still a workaround, as dev team, you should implement it in some more proper way. I wrote a "testing if SKey is held" python script sample, it's based on a python template in blender. .blend file here: [test_if_SKey_held.blend](https://archive.blender.org/developer/F166221/test_if_SKey_held.blend) You can play with it, simply run the script in the text editor, then press S key a few times in 3d view, you'll see the difference. Hope it's helpful for you team to a proper solution soon.

Added subscriber: @mont29

Added subscriber: @mont29
Brecht Van Lommel removed their assignment 2015-05-07 23:04:00 +02:00

Added subscriber: @Sergey

Added subscriber: @Sergey

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2015-05-25 21:08:21 +02:00

To me it seems to be just a famous keymapping conflict, where pressing S (press == hold the key down) triggers transform operator and surely prevents S-RMB from invoking.

You can work around this locally by re-assigning scale to click event. It's not ideal but should work for you.

Re-considering the shortcuts is in our list for improvements and will happen outside of the bug tracker. So thanks for the report, but archiving it now.

To me it seems to be just a famous keymapping conflict, where pressing S (press == hold the key down) triggers transform operator and surely prevents S-RMB from invoking. You can work around this locally by re-assigning scale to click event. It's not ideal but should work for you. Re-considering the shortcuts is in our list for improvements and will happen outside of the bug tracker. So thanks for the report, but archiving it now.
Author

In #44349#311375, @Sergey wrote:
To me it seems to be just a famous keymapping conflict, where pressing S (press == hold the key down) triggers transform operator and surely prevents S-RMB from invoking.

You can work around this locally by re-assigning scale to click event. It's not ideal but should work for you.

Re-considering the shortcuts is in our list for improvements and will happen outside of the bug tracker. So thanks for the report, but archiving it now.

Thank you, but I'd already been not using S-key for scaling since the day I started to use blender. Instead, I always use X-key for all scaling operation types.

> In #44349#311375, @Sergey wrote: > To me it seems to be just a famous keymapping conflict, where pressing S (press == hold the key down) triggers transform operator and surely prevents S-RMB from invoking. > > You can work around this locally by re-assigning scale to click event. It's not ideal but should work for you. > > Re-considering the shortcuts is in our list for improvements and will happen outside of the bug tracker. So thanks for the report, but archiving it now. Thank you, but I'd already been not using S-key for scaling since the day I started to use blender. Instead, I always use X-key for all scaling operation types.

Added subscriber: @CJ-Ferguson

Added subscriber: @CJ-Ferguson

This comment was removed by @CJ-Ferguson

*This comment was removed by @CJ-Ferguson*
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
5 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#44349
No description provided.