added keypress support