Example usage for android.view KeyEvent isModifierKey

List of usage examples for android.view KeyEvent isModifierKey

Introduction

In this page you can find the example usage for android.view KeyEvent isModifierKey.

Prototype

public static boolean isModifierKey(int keyCode) 

Source Link

Document

Returns true if this key code is a modifier key.

Usage

From source file:info.guardianproject.otr.app.im.app.ContactListActivity.java

private static boolean isReadable(int keyCode, KeyEvent event) {
    if (KeyEvent.isModifierKey(keyCode) || event.isSystem()) {
        return false;
    }/*  w  w w .j  a v a2  s .  com*/

    switch (keyCode) {
    case KeyEvent.KEYCODE_DPAD_CENTER:
    case KeyEvent.KEYCODE_DPAD_DOWN:
    case KeyEvent.KEYCODE_DPAD_LEFT:
    case KeyEvent.KEYCODE_DPAD_RIGHT:
    case KeyEvent.KEYCODE_DPAD_UP:
    case KeyEvent.KEYCODE_ENTER:
        return false;
    }

    return true;
}