I am writing a game programming library in JavaScript, and I am trying to make use of the iCade on the iPad platform. I actually got it working through a rather hacky solution. However, it's not quite there yet.
iCade uses keyboard presses to translate. The problem with that is I am having trouble attaching keyboard events to things other than input elements. My first question would be is there a way to attach keyboard events to something that isn't a text input element?
So instead, I attached it to a element. I made the element opacity 0, width/height 0, and pushed the z index way to the back, and focus it. Worked alright, except it's kinda hacky, but still it's there. However, when the element is focused (and bluetooth is not on) the soft keyboard comes up. Furthermore, when the iCade/bluetooth is enabled, the keyboard goes away, but you still are stuck with the form assistant bar (Previous/Next) at the bottom of the browser. It's ugly and it gets in the way of my display. My second question would be is there anyway to either defocus the soft keyboard but retain the key events of the input, or maybe just hide the bottom input bar in the browser?
Also, solutions should not involve jQuery. I've written everything in my game library without the need for jQuery.
UPDATE: I have figured out a cleaner looking way to implement the input field. With that said, I would like to add a third question: If the 1st and 2nd questions can't be done, is there any way to make the translucent form assistant bar at the bottom of the iPad browser window disappear? If that's possible then my mission will be 100% complete.