You can't use a definition like that directly in a pattern match; a name starting with lowercase is a new binding, not the value of some existing binding. You can instead use a guard or, sometimes, a pattern guard.
That is,
keyboardAct a d p (SpecialKey KeyLeft) Down shiftDown =
is identical to
keyboardAct a d p (SpecialKey KeyLeft) Down x =
aside from the name of the new local binding it introduces. It does *not* use an existing binding for shiftDown or x, it always creates a new one.