Move hint check to onKeyDown