fix MacOS bug mapping modifier keys to the scancode array

This fixes the handling of MacOS modifier keys...