Bug 446866 - Check state mask if no modifier key was pressed, otherwise
no match.

Change-Id: I7dfdd0330ecb652f11365699f788a573b4d1873c
Signed-off-by: Roman Flückiger <roman.flueckiger@mac.com>