Improvement of key and mouse wheel listeners