Keyboard Simulator in Javascript