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

Closed
opened 8 years ago by Rays-Lv · 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
Poster

Changed status to: 'Open'

Changed status to: 'Open'
brecht was assigned by Rays-Lv 8 years ago
Poster

Added subscriber: @Rays-Lv

Added subscriber: @Rays-Lv
Collaborator

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Collaborator

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)
Poster

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.
Collaborator

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
Poster

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.
mont29 commented 8 years ago
Owner

Added subscriber: @mont29

Added subscriber: @mont29
brecht removed their assignment 8 years ago
Sergey commented 8 years ago
Owner

Added subscriber: @Sergey

Added subscriber: @Sergey
Sergey commented 8 years ago
Owner

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey closed this issue 8 years ago
Sergey self-assigned this 8 years ago
Sergey commented 8 years ago
Owner

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.
Poster

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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#44349
Loading…
There is no content yet.