[lively-kernel] Wanted: keyboard input for iPad/iPhone

Christopher F Lowery chris at solver.com
Sat May 8 19:20:11 CEST 2010


Longtime LK Lurker here. Dan said: 
> my sense is that one could hack a visible or non-visible text field 
> in the dom and give it focus.

I was surprised to get this working on the iPad simulator. JavaScript can invoke the iPad's soft keyboard on a single or multiline <form> element. Example: 
http://heartofland.com/apps/readRTouch/focustest.html
call: document.scratchForm.scratchText.focus();

Might also work outside a <form> element. 

-Chris

p.s. I was surprised because Safari doesn't let JS generate keyboard events. The arrow keys are missing from all iPad/iPhone soft keyboards. This means 98% of HTML5 games are unplayable. Does anyone know how to make iPad/iPhone "hear" keyboard presses via JavaScript?


More information about the lively-kernel mailing list