0

I want to know if there is any provision that allows me to read the input key from a hardware keyboard present on the phone or connected externally in android . I basically am building an application that needs to have special shortcuts set . I researched about the WindowManagerPolicy but eclipse does not seem to support any interface of that sort . I need help even starting .

Thank you

Saiesh
  • 641
  • 2
  • 7
  • 23

1 Answers1

1
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {

    return super.onKeyDown(keyCode, event);    
}

override activity's onKeyDown to catch keyboard event

Jiang Qi
  • 4,450
  • 3
  • 19
  • 19
  • 1
    This dos not work for a hardware keyboard BTW . Its only for input from the virtual keyboard . – Saiesh Apr 05 '12 at 17:58