How to listen to any keyboard on the whole application?

Viewed 2762

We are trying to build android activity that listen to any key press (either character or command) something like custom EditText.

  1. Is there something like keyboard hook in Windows OS available on Android?
  2. Is it possible to listen for all key pressed for all controls (EditText and other controls)?
  3. Could this be achieved by an activity that runs in the background?

EDIT

As for security, we want to get keyboard events only for our app activity, ex: when our activity is shown and focused.

5 Answers
Related