Pattern synonymify Scancode and Keycode

This should be a more future-proof way to handle these.