Back to project page Stroke5Keyboard-android.
The source code is released under:
GNU General Public License
If you think the Android project Stroke5Keyboard-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.
/* Stroke5 Chinese Input Method for Android Copyright (C) 2012 LinkOmnia Ltd.//from w w w . ja v a2s .co m Author: Wan Leung Wong (wanleung@linkomnia.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.linkomnia.android.Stroke5; import android.content.Context; import android.inputmethodservice.Keyboard; import android.inputmethodservice.KeyboardView; import android.inputmethodservice.Keyboard.Key; import android.util.AttributeSet; import android.util.Log; public class IMEKeyboardView extends KeyboardView { public IMEKeyboardView(Context context, AttributeSet attrs) { super(context, attrs); } public IMEKeyboardView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected boolean onLongPress(Key key) { if (key.codes[0] == IMEKeyboard.KEYCODE_SHIFT) { getOnKeyboardActionListener().onKey(IMEKeyboard.KEYCODE_CAPLOCK, null); return true; } else { return super.onLongPress(key); } } }