onKeyDown in a service? (Global Hot Keys)
You cannot do this 🙂
You cannot do this 🙂
Ok. I finally figured how to do what I want, and I am not proud on Android for this. I am writing server/client application where on client I have to open SoftKeyboard and send pressed keys (characters and DEL key)… Each time key is pressed, that character is sent to server. If DEL is pressed … Read more
I don’t believe an OnKeyListener gets called at all with the software keyboard. It has something to do with the software keyboard being an IME device and IME devices possibly being things other than keyboards. It seems to make onKeyListener pretty much useless though, since it only works on phones with hardware keyboards. I worked … Read more
Try this: document.addEventListener(“keydown”, KeyCheck); //or however you are calling your method function KeyCheck(event) { var KeyID = event.keyCode; switch(KeyID) { case 8: alert(“backspace”); break; case 46: alert(“delete”); break; default: break; } }