add keyboard direction detect