diff options
| author | juloo | 2016-12-11 22:45:58 +0100 |
|---|---|---|
| committer | juloo | 2016-12-11 22:45:58 +0100 |
| commit | 0b943952333c7578ef99b1bf09b39a18483efaf6 (patch) | |
| tree | 1e473b159f53349b2f3815a390e588510b805be7 /srcs/juloo.keyboard2/Keyboard2.java | |
| parent | 162f17a7a01b9518c2a36940ce68620c59f20d5e (diff) | |
| download | unexpected-keyboard-0b943952333c7578ef99b1bf09b39a18483efaf6.tar.gz unexpected-keyboard-0b943952333c7578ef99b1bf09b39a18483efaf6.zip | |
switchToNextInputMethod key
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index 3d4fda5..6123093 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -9,9 +9,11 @@ import android.os.Bundle; import android.text.InputType; import android.preference.PreferenceManager; import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputMethodManager; import android.view.KeyEvent; import android.view.View; import android.view.ViewGroup; +import android.util.Log; public class Keyboard2 extends InputMethodService implements SharedPreferences.OnSharedPreferenceChangeListener @@ -123,6 +125,12 @@ public class Keyboard2 extends InputMethodService } else if (eventCode == KeyValue.EVENT_SWITCH_BACK_EMOJI) setInputView(_keyboardView); + else if (eventCode == KeyValue.EVENT_CHANGE_METHOD) + { + InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE); + + imm.switchToNextInputMethod(getWindow().getWindow().getAttributes().token, false); + } else if ((flags & (KeyValue.FLAG_CTRL | KeyValue.FLAG_ALT)) != 0) handleMetaKeyUp(key, flags); // else if (eventCode == KeyEvent.KEYCODE_DEL) |
