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

有帮助吗?

解决方案

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

    return super.onKeyDown(keyCode, event);    
}

override activity's onKeyDown to catch keyboard event

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top