Java Code Examples for android.view.KeyEvent#isSystem()

The following examples show how to use android.view.KeyEvent#isSystem() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AndroidXpraWindow.java    From xpra-client with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
	System.out.println(event);
	if(event.isSystem()) {
		System.out.println("isSystem event");
		return false;
	}
	System.out.println(event.getUnicodeChar());
	switch (event.getAction()) {
	case KeyEvent.ACTION_DOWN:
		keyboardAction(keyCode, AndroidXpraKeyboard.getUnicodeName(keyCode), true);
		break;

	case KeyEvent.ACTION_UP:
		keyboardAction(keyCode, AndroidXpraKeyboard.getUnicodeName(keyCode), false);
	default:
		break;
	}
	return true;
}
 
Example 2
Source File: PlaybackOverlaySupportFragment.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
private static boolean isConsumableKey(KeyEvent keyEvent) {
    if (keyEvent.isSystem()) {
        return false;
    }
    return true;
}
 
Example 3
Source File: PlaybackOverlayFragment.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
private static boolean isConsumableKey(KeyEvent keyEvent) {
    if (keyEvent.isSystem()) {
        return false;
    }
    return true;
}
 
Example 4
Source File: EmulatorView.java    From Ansole with GNU General Public License v2.0 4 votes vote down vote up
private boolean isSystemKey(int keyCode, KeyEvent event) {
    return event.isSystem();
}