title: JS Game Programming - Using keyboard events for bluetooth keyboard/iCade with iPad browser?
body: <p>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.</p>
  
  <p>iCade uses keyboard presses to translate. The problem with that is I am having trouble attaching keyboard events to things other than input elements. <strong>My first question would be is there a way to attach keyboard events to something that isn't a text input element?</strong></p>
  
  <p>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. <strong>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?</strong></p>
  
  <p>Also, solutions should not involve jQuery. I've written everything in my game library without the need for jQuery.</p>
  
  <p>UPDATE: I have figured out a cleaner looking way to implement the input field. <strong>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?</strong> If that's possible then my mission will be 100% complete.</p>