Added clipboard clearing and scancode handling.