List of usage examples for android.text.method MetaKeyKeyListener handleKeyUp
public static long handleKeyUp(long state, int keyCode, KeyEvent event)
From source file:research.sg.edu.edapp.kb.KbSoftKeyboard.java
/** * Use this to monitor key events being delivered to the application. * We get first crack at them, and can either resume them or let them * continue to the app./*from w w w.j a v a 2s . c o m*/ */ @Override public boolean onKeyUp(int keyCode, KeyEvent event) { // If we want to do transformations on text being entered with a hard // keyboard, we need to process the up events to update the meta key // state we are tracking. if (PROCESS_HARD_KEYS) { if (mPredictionOn) { mMetaState = MetaKeyKeyListener.handleKeyUp(mMetaState, keyCode, event); } //print swipe on the edit text field after processing it keyDownUp(keyCode); } if (event.getAction() == KeyEvent.ACTION_UP) { Log.d("INUP ", swipe); } return super.onKeyUp(keyCode, event); }
From source file:com.strathclyde.highlightingkeyboard.SoftKeyboardService.java
/** * Use this to monitor key events being delivered to the application. * We get first crack at them, and can either resume them or let them * continue to the app.//from w w w. ja v a2 s. c om */ @Override public boolean onKeyUp(int keyCode, KeyEvent event) { // If we want to do transformations on text being entered with a hard // keyboard, we need to process the up events to update the meta key // state we are tracking. if (PROCESS_HARD_KEYS) { if (mPredictionOn) { mMetaState = MetaKeyKeyListener.handleKeyUp(mMetaState, keyCode, event); } } return super.onKeyUp(keyCode, event); }