Normalize keyboard events involving modifiers

Different browsers + platforms report when the modifier is activated
differently. Easiest way to cope with this is to manually normalize
these events.

Fixes issue #322.