use of com.android.inputmethod.event.Event in project android_packages_inputmethods_LatinIME by CyanogenMod.
the class MockKeyboardSwitcher method onCodeInput.
public void onCodeInput(final int code) {
if (mAutoCapsMode == MockConstants.CAP_MODE_WORDS) {
if (Constants.isLetterCode(code)) {
mAutoCapsState = (code == MockConstants.CODE_AUTO_CAPS_TRIGGER) ? mAutoCapsMode : MockConstants.CAP_MODE_OFF;
}
} else {
mAutoCapsState = mAutoCapsMode;
}
final Event event = Event.createSoftwareKeypressEvent(code, /* codePoint */
code, /* keyCode */
Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE, false);
mState.onEvent(event, mAutoCapsState, RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE);
}
Aggregations