Check Shift status when spacebar is pressed.

Most printable characters come from keys where the character will change
depending on shift (e.g. Shift-a becomes A or Shift-1 becomes !).
Only add a check for the space character as that one has no double
function.

The alternative to changing the equals method is to make it a "special
key", but then every mode would need changing.

Fixes #358.