Like the combination of Power button and Volume down button - takes a screenshot of the phone... similarly I am trying to access volume up and power button long pressed keys in
I don't understand programming under android, but I see it uses Java classes, so try this
public class BitKeys implements KeyListener {
private BitSet keyBits = new BitSet(256);
@Override
public void keyPressed(final KeyEvent event) {
int keyCode = event.getKeyCode();
keyBits.set(keyCode);
}
@Override
public void keyReleased(final KeyEvent event) {
int keyCode = event.getKeyCode();
keyBits.clear(keyCode);
}
@Override
public void keyTyped(final KeyEvent event) {
// don't care
}
public boolean isKeyPressed(final int keyCode) {
return keyBits.get(keyCode);
}
}
I found this here : handle multiple key presses ignoring repeated key