[Mac] Fix key repeat and connect legacy keyboard events