Refacto input keyup + focus