Mouse movement reimplemented