Handle keys by input edit