Back to project page TaigIME-android.
The source code is released under:
GNU General Public License
If you think the Android project TaigIME-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package fr.magistry.taigime; //from w w w. j av a 2 s. c o m import android.content.Context; import android.inputmethodservice.Keyboard; import android.inputmethodservice.KeyboardView; import android.util.Log; import android.view.inputmethod.InputMethodManager; /** * Created by pierre on 27/09/14. */ public class MyKeyboard extends KeyboardView { Context mCtxt; MyKeyboard(Context ctxt){ super(ctxt, null); mCtxt = ctxt; } @Override protected boolean onLongPress(Keyboard.Key key) { if (key.codes[0] == 32) { Log.v("ime", "long space press!"); InputMethodManager mgr = (InputMethodManager) mCtxt.getSystemService(mCtxt.INPUT_METHOD_SERVICE); if (mgr != null) { mgr.showInputMethodPicker(); } } return true; } }