Finish the implementation of webpage.sendEvent() for keys