Modal operators get double click events when keyboard-keys are pressed fast.
Closed, ResolvedPublic

Description

With the default blend scene.

In editmode select a face, press ctrl+b, Then press '2' twice-fast.
Only the first number is accepted. If you press slowly the number '22'
shows up as expected.

While we can check every modal operator that is checking `KM_PRESS` and check for KM_DBL_CLICK too, I think it would be better to resolve this in the event system.

From what I can tell this is caused by converting from KM_DBL_CLICK back to KM_PRESS happens after modal operators are handled.
see: wm_handlers_do(), 'else if (event->val == KM_DBL_CLICK) {'

Campbell Barton (campbellbarton) set Type to Bug.Via Old WorldJan 2 2013, 8:00 AM
Ton Roosendaal (ton) added a comment.Via Old WorldJan 2 2013, 11:34 AM

I have it on my list, no problem to do this.

Ton Roosendaal (ton) added a comment.Via Old WorldJan 9 2013, 5:55 PM

BTW It works fine for modal ops with own modal maps (like transform).
Will check it further tomorrow, other urgent issues popped up :)

Ton Roosendaal (ton) added a comment.Via Old WorldJan 10 2013, 12:07 PM

Modal operators typically just return a "running modal" flag, denoting to block any further handling.
That makes the hack for redoing a handler queue for unhandled double-clicks not work.

I've added code now that just doesn't give modal ops Double Clicks (only when they don't have a modal key map). All these key codes are hardcoded in C, and we don't use double clicks internally anyway.

Ton Roosendaal (ton) closed this task as "Resolved".Via Old WorldJan 10 2013, 12:07 PM

Add Comment