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


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) {'



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

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

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.Jan 10 2013, 12:07 PM