Fix T44251: Changing views using numpad broken

For KM_ANY I've filtered out every event that has a click type, although
that was only needed for the additional event sent on KM_HOLD. A bit weird
that this only happened on a few machines though.
This commit is contained in:
Julian Eisel 2015-04-04 19:17:39 +02:00
parent 59df941ea5
commit 1604a26fe6
Notes: blender-bot 2023-09-13 08:48:34 +02:00
Referenced by issue #44251, '0'-key shortcut in 3DView (switch to/from camera view) broken - sticky keys?
1 changed files with 2 additions and 2 deletions

View File

@ -1460,8 +1460,8 @@ static int wm_eventmatch(wmEvent *winevent, wmKeyMapItem *kmi)
if (kmitype != KM_ANY)
if (winevent->type != kmitype) return 0;
/* KM_ANY excludes click_type events - filter them out */
if (kmi->val == KM_ANY && winevent->click_type) return 0;
/* KM_ANY excludes KM_HOLD since it's time based and not a real input - filter it out */
if (kmi->val == KM_ANY && winevent->click_type == KM_HOLD) return 0;
if (kmi->val != KM_ANY)
if (!ELEM(kmi->val, winevent->val, winevent->click_type)) return 0;