Example usage for android.view KeyEvent KEYCODE_PICTSYMBOLS

List of usage examples for android.view KeyEvent KEYCODE_PICTSYMBOLS

Introduction

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

Prototype

int KEYCODE_PICTSYMBOLS

To view the source code for android.view KeyEvent KEYCODE_PICTSYMBOLS.

Click Source Link

Document

Key code constant: Picture Symbols modifier key.

Usage

From source file:com.ichi2.anki.AbstractFlashcardViewer.java

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    // Hardware buttons for scrolling
    if (keyCode == KeyEvent.KEYCODE_PAGE_UP) {
        mCard.pageUp(false);/*w  ww .  ja va2s  .  c  o m*/
        if (mDoubleScrolling) {
            mCard.pageUp(false);
        }
        return true;
    }
    if (keyCode == KeyEvent.KEYCODE_PAGE_DOWN) {
        mCard.pageDown(false);
        if (mDoubleScrolling) {
            mCard.pageDown(false);
        }
        return true;
    }
    if (mScrollingButtons && keyCode == KeyEvent.KEYCODE_PICTSYMBOLS) {
        mCard.pageUp(false);
        if (mDoubleScrolling) {
            mCard.pageUp(false);
        }
        return true;
    }
    if (mScrollingButtons && keyCode == KeyEvent.KEYCODE_SWITCH_CHARSET) {
        mCard.pageDown(false);
        if (mDoubleScrolling) {
            mCard.pageDown(false);
        }
        return true;
    }
    return super.onKeyDown(keyCode, event);
}