core: shortcut still return a value when invalid
core: shortcut still return a value when invalid

Mouse events could have no main key and thus invalid.

danny0838/firefox-scrapbook,danny0838/firefox-scrapbook