diff options
Diffstat (limited to 'java/src')
14 files changed, 999 insertions, 739 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java b/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java index 9eeee5baf..00ea20d2c 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java @@ -20,7 +20,6 @@ import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.InputPointers; public interface KeyboardActionListener { - /** * Called when the user presses a key. This is sent before the {@link #onCodeInput} is called. * For keys that repeat, this is only called once. @@ -99,9 +98,9 @@ public interface KeyboardActionListener { */ public boolean onCustomRequest(int requestCode); - public static class Adapter implements KeyboardActionListener { - public static final Adapter EMPTY_LISTENER = new Adapter(); + public static final KeyboardActionListener EMPTY_LISTENER = new Adapter(); + public static class Adapter implements KeyboardActionListener { @Override public void onPressKey(int primaryCode, boolean isSinglePointer) {} @Override diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 4323f7171..98e2baee2 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -31,7 +31,6 @@ import com.android.inputmethod.accessibility.AccessibleKeyboardViewProxy; import com.android.inputmethod.keyboard.KeyboardLayoutSet.KeyboardLayoutSetException; import com.android.inputmethod.keyboard.PointerTracker.TimerProxy; import com.android.inputmethod.keyboard.internal.KeyboardState; -import com.android.inputmethod.latin.AudioAndHapticFeedbackManager; import com.android.inputmethod.latin.InputView; import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.LatinImeLogger; @@ -210,7 +209,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } public void onPressKey(final int code, final boolean isSinglePointer) { - hapticAndAudioFeedback(code); mState.onPressKey(code, isSinglePointer, mLatinIME.getCurrentAutoCapsState()); } @@ -299,13 +297,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { ? keyboardView.getTimerProxy().isInDoubleTapShiftKeyTimeout() : false; } - private void hapticAndAudioFeedback(final int code) { - if (mKeyboardView == null || mKeyboardView.isInSlidingKeyInput()) { - return; - } - AudioAndHapticFeedbackManager.getInstance().hapticAndAudioFeedback(code, mKeyboardView); - } - /** * Updates state machine to figure out when to automatically switch back to the previous mode. */ diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 8a926d655..a4606f2f3 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -57,10 +57,8 @@ import com.android.inputmethod.keyboard.internal.KeyPreviewDrawParams; import com.android.inputmethod.keyboard.internal.PreviewPlacerView; import com.android.inputmethod.keyboard.internal.SlidingKeyInputPreview; import com.android.inputmethod.keyboard.internal.TouchScreenRegulator; -import com.android.inputmethod.latin.AudioAndHapticFeedbackManager; import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.DebugSettings; -import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.Settings; @@ -240,11 +238,15 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack break; case MSG_REPEAT_KEY: final Key currentKey = tracker.getKey(); - if (currentKey != null && currentKey.mCode == msg.arg1) { - tracker.onRepeatKey(currentKey); - AudioAndHapticFeedbackManager.getInstance().hapticAndAudioFeedback( - currentKey.mCode, keyboardView); + final int code = msg.arg1; + if (currentKey != null && currentKey.mCode == code) { startKeyRepeatTimer(tracker, mKeyRepeatInterval); + startTypingStateTimer(currentKey); + final KeyboardActionListener listener = + keyboardView.getKeyboardActionListener(); + listener.onPressKey(code, true /* isSinglePointer */); + listener.onCodeInput(code, + Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE); } break; case MSG_LONGPRESS_KEY: @@ -564,6 +566,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack altCodeKeyWhileTypingFadeoutAnimatorResId, this); mAltCodeKeyWhileTypingFadeinAnimator = loadObjectAnimator( altCodeKeyWhileTypingFadeinAnimatorResId, this); + + mKeyboardActionListener = KeyboardActionListener.EMPTY_LISTENER; } private ObjectAnimator loadObjectAnimator(final int resId, final Object target) { @@ -977,39 +981,28 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.mainKeyboardView_onLongPress(); } - final int code = key.mCode; + final KeyboardActionListener listener = mKeyboardActionListener; if (key.hasNoPanelAutoMoreKey()) { - final int embeddedCode = key.mMoreKeys[0].mCode; + final int moreKeyCode = key.mMoreKeys[0].mCode; tracker.onLongPressed(); - invokeCodeInput(embeddedCode); - invokeReleaseKey(code); - AudioAndHapticFeedbackManager.getInstance().hapticAndAudioFeedback(code, this); + listener.onPressKey(moreKeyCode, true /* isSinglePointer */); + listener.onCodeInput(moreKeyCode, + Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE); + listener.onReleaseKey(moreKeyCode, false /* withSliding */); return; } + final int code = key.mCode; if (code == Constants.CODE_SPACE || code == Constants.CODE_LANGUAGE_SWITCH) { // Long pressing the space key invokes IME switcher dialog. - if (invokeCustomRequest(LatinIME.CODE_SHOW_INPUT_METHOD_PICKER)) { + if (listener.onCustomRequest(Constants.CUSTOM_CODE_SHOW_INPUT_METHOD_PICKER)) { tracker.onLongPressed(); - invokeReleaseKey(code); + listener.onReleaseKey(code, false /* withSliding */); return; } } openMoreKeysPanel(key, tracker); } - private boolean invokeCustomRequest(final int requestCode) { - return mKeyboardActionListener.onCustomRequest(requestCode); - } - - private void invokeCodeInput(final int code) { - mKeyboardActionListener.onCodeInput( - code, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE); - } - - private void invokeReleaseKey(final int code) { - mKeyboardActionListener.onReleaseKey(code, false); - } - private void openMoreKeysPanel(final Key key, final PointerTracker tracker) { final MoreKeysPanel moreKeysPanel = onCreateMoreKeysPanel(key, getContext()); if (moreKeysPanel == null) { diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index 7b14259a0..53207597a 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -175,7 +175,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element { private DrawingProxy mDrawingProxy; private TimerProxy mTimerProxy; private KeyDetector mKeyDetector; - private KeyboardActionListener mListener = KeyboardActionListener.Adapter.EMPTY_LISTENER; + private KeyboardActionListener mListener = KeyboardActionListener.EMPTY_LISTENER; private Keyboard mKeyboard; private int mPhantonSuddenMoveThreshold; @@ -1263,13 +1263,8 @@ public final class PointerTracker implements PointerTrackerQueue.Element { if (!key.isRepeatable()) return; // Don't start key repeat when we are in sliding input mode. if (mIsInSlidingKeyInput) return; - onRepeatKey(key); - mTimerProxy.startKeyRepeatTimer(this); - } - - public void onRepeatKey(final Key key) { detectAndSendKey(key, key.mX, key.mY, SystemClock.uptimeMillis()); - mTimerProxy.startTypingStateTimer(key); + mTimerProxy.startKeyRepeatTimer(this); } private boolean isMajorEnoughMoveToBeOnNewKey(final int x, final int y, final long eventTime, diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java index 370d0cb93..8ead44c31 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java @@ -81,9 +81,6 @@ public final class KeyboardState { private boolean mPrevSymbolsKeyboardWasShifted; private int mRecapitalizeMode; - // For handling long press. - private boolean mLongPressShiftLockFired; - // For handling double tap. private boolean mIsInAlphabetUnshiftedFromShifted; private boolean mIsInDoubleTapShiftKey; @@ -325,10 +322,11 @@ public final class KeyboardState { } if (code == Constants.CODE_SHIFT) { onPressShift(); + } else if (code == Constants.CODE_CAPSLOCK) { + // Nothing to do here. See {@link #onReleaseKey(int,boolean)}. } else if (code == Constants.CODE_SWITCH_ALPHA_SYMBOL) { onPressSymbol(); } else { - mLongPressShiftLockFired = false; mShiftKeyState.onOtherKeyPressed(); mSymbolKeyState.onOtherKeyPressed(); // It is required to reset the auto caps state when all of the following conditions @@ -356,6 +354,8 @@ public final class KeyboardState { } if (code == Constants.CODE_SHIFT) { onReleaseShift(withSliding); + } else if (code == Constants.CODE_CAPSLOCK) { + setShiftLocked(!mAlphabetShiftState.isShiftLocked()); } else if (code == Constants.CODE_SWITCH_ALPHA_SYMBOL) { onReleaseSymbol(withSliding); } @@ -437,7 +437,6 @@ public final class KeyboardState { } private void onPressShift() { - mLongPressShiftLockFired = false; // If we are recapitalizing, we don't do any of the normal processing, including // importantly the double tap timer. if (RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE != mRecapitalizeMode) { @@ -499,8 +498,6 @@ public final class KeyboardState { // Double tap shift key has been handled in {@link #onPressShift}, so that just // ignore this release shift key here. mIsInDoubleTapShiftKey = false; - } else if (mLongPressShiftLockFired) { - setShiftLocked(!mAlphabetShiftState.isShiftLocked()); } else if (mShiftKeyState.isChording()) { if (mAlphabetShiftState.isShiftLockShifted()) { // After chording input while shift locked state. @@ -610,12 +607,6 @@ public final class KeyboardState { break; } - if (code == Constants.CODE_CAPSLOCK) { - // Changing shift lock state will be handled at {@link #onPressShift()} when the shift - // key is released. - mLongPressShiftLockFired = true; - } - // If the code is a letter, update keyboard shift state. if (Constants.isLetterCode(code)) { updateAlphabetShiftState(autoCaps, RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE); diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java index 467c15ffd..1594df75b 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java @@ -133,122 +133,125 @@ public final class KeyboardTextsSet { /* 28 */ "keylabel_for_east_slavic_row2_11", /* 29 */ "keylabel_for_east_slavic_row3_5", /* 30 */ "more_keys_for_cyrillic_u", - /* 31 */ "more_keys_for_cyrillic_en", - /* 32 */ "more_keys_for_cyrillic_ghe", - /* 33 */ "more_keys_for_east_slavic_row2_1", - /* 34 */ "more_keys_for_cyrillic_o", - /* 35 */ "more_keys_for_cyrillic_soft_sign", - /* 36 */ "keylabel_for_south_slavic_row1_6", - /* 37 */ "keylabel_for_south_slavic_row2_11", - /* 38 */ "keylabel_for_south_slavic_row3_1", - /* 39 */ "keylabel_for_south_slavic_row3_8", - /* 40 */ "more_keys_for_cyrillic_ie", - /* 41 */ "more_keys_for_cyrillic_i", - /* 42 */ "label_to_alpha_key", - /* 43 */ "single_quotes", - /* 44 */ "double_quotes", - /* 45 */ "single_angle_quotes", - /* 46 */ "double_angle_quotes", - /* 47 */ "more_keys_for_currency_dollar", - /* 48 */ "keylabel_for_currency_generic", - /* 49 */ "more_keys_for_currency_generic", - /* 50 */ "more_keys_for_punctuation", - /* 51 */ "more_keys_for_star", - /* 52 */ "more_keys_for_bullet", - /* 53 */ "more_keys_for_plus", - /* 54 */ "more_keys_for_left_parenthesis", - /* 55 */ "more_keys_for_right_parenthesis", - /* 56 */ "more_keys_for_less_than", - /* 57 */ "more_keys_for_greater_than", - /* 58 */ "more_keys_for_arabic_diacritics", - /* 59 */ "keyhintlabel_for_arabic_diacritics", - /* 60 */ "keylabel_for_symbols_1", - /* 61 */ "keylabel_for_symbols_2", - /* 62 */ "keylabel_for_symbols_3", - /* 63 */ "keylabel_for_symbols_4", - /* 64 */ "keylabel_for_symbols_5", - /* 65 */ "keylabel_for_symbols_6", - /* 66 */ "keylabel_for_symbols_7", - /* 67 */ "keylabel_for_symbols_8", - /* 68 */ "keylabel_for_symbols_9", - /* 69 */ "keylabel_for_symbols_0", - /* 70 */ "label_to_symbol_key", - /* 71 */ "label_to_symbol_with_microphone_key", - /* 72 */ "additional_more_keys_for_symbols_1", - /* 73 */ "additional_more_keys_for_symbols_2", - /* 74 */ "additional_more_keys_for_symbols_3", - /* 75 */ "additional_more_keys_for_symbols_4", - /* 76 */ "additional_more_keys_for_symbols_5", - /* 77 */ "additional_more_keys_for_symbols_6", - /* 78 */ "additional_more_keys_for_symbols_7", - /* 79 */ "additional_more_keys_for_symbols_8", - /* 80 */ "additional_more_keys_for_symbols_9", - /* 81 */ "additional_more_keys_for_symbols_0", - /* 82 */ "more_keys_for_symbols_1", - /* 83 */ "more_keys_for_symbols_2", - /* 84 */ "more_keys_for_symbols_3", - /* 85 */ "more_keys_for_symbols_4", - /* 86 */ "more_keys_for_symbols_5", - /* 87 */ "more_keys_for_symbols_6", - /* 88 */ "more_keys_for_symbols_7", - /* 89 */ "more_keys_for_symbols_8", - /* 90 */ "more_keys_for_symbols_9", - /* 91 */ "more_keys_for_symbols_0", - /* 92 */ "keylabel_for_comma", - /* 93 */ "more_keys_for_comma", - /* 94 */ "keylabel_for_symbols_question", - /* 95 */ "keylabel_for_symbols_semicolon", - /* 96 */ "keylabel_for_symbols_percent", - /* 97 */ "more_keys_for_symbols_exclamation", - /* 98 */ "more_keys_for_symbols_question", - /* 99 */ "more_keys_for_symbols_semicolon", - /* 100 */ "more_keys_for_symbols_percent", - /* 101 */ "keylabel_for_tablet_comma", - /* 102 */ "keyhintlabel_for_tablet_comma", - /* 103 */ "more_keys_for_tablet_comma", - /* 104 */ "keyhintlabel_for_tablet_period", - /* 105 */ "more_keys_for_tablet_period", - /* 106 */ "keylabel_for_apostrophe", - /* 107 */ "keyhintlabel_for_apostrophe", - /* 108 */ "more_keys_for_apostrophe", - /* 109 */ "more_keys_for_q", - /* 110 */ "more_keys_for_x", - /* 111 */ "keylabel_for_q", - /* 112 */ "keylabel_for_w", - /* 113 */ "keylabel_for_y", - /* 114 */ "keylabel_for_x", - /* 115 */ "keylabel_for_spanish_row2_10", - /* 116 */ "more_keys_for_am_pm", - /* 117 */ "settings_as_more_key", - /* 118 */ "shortcut_as_more_key", - /* 119 */ "action_next_as_more_key", - /* 120 */ "action_previous_as_more_key", - /* 121 */ "label_to_more_symbol_key", - /* 122 */ "label_to_more_symbol_for_tablet_key", - /* 123 */ "label_tab_key", - /* 124 */ "label_to_phone_numeric_key", - /* 125 */ "label_to_phone_symbols_key", - /* 126 */ "label_time_am", - /* 127 */ "label_time_pm", - /* 128 */ "label_to_symbol_key_pcqwerty", - /* 129 */ "keylabel_for_popular_domain", - /* 130 */ "more_keys_for_popular_domain", - /* 131 */ "more_keys_for_smiley", - /* 132 */ "single_laqm_raqm", - /* 133 */ "single_laqm_raqm_rtl", - /* 134 */ "single_raqm_laqm", - /* 135 */ "double_laqm_raqm", - /* 136 */ "double_laqm_raqm_rtl", - /* 137 */ "double_raqm_laqm", - /* 138 */ "single_lqm_rqm", - /* 139 */ "single_9qm_lqm", - /* 140 */ "single_9qm_rqm", - /* 141 */ "double_lqm_rqm", - /* 142 */ "double_9qm_lqm", - /* 143 */ "double_9qm_rqm", - /* 144 */ "more_keys_for_single_quote", - /* 145 */ "more_keys_for_double_quote", - /* 146 */ "more_keys_for_tablet_double_quote", + /* 31 */ "more_keys_for_cyrillic_ka", + /* 32 */ "more_keys_for_cyrillic_en", + /* 33 */ "more_keys_for_cyrillic_ghe", + /* 34 */ "more_keys_for_east_slavic_row2_1", + /* 35 */ "more_keys_for_cyrillic_a", + /* 36 */ "more_keys_for_cyrillic_o", + /* 37 */ "more_keys_for_cyrillic_soft_sign", + /* 38 */ "more_keys_for_east_slavic_row2_11", + /* 39 */ "keylabel_for_south_slavic_row1_6", + /* 40 */ "keylabel_for_south_slavic_row2_11", + /* 41 */ "keylabel_for_south_slavic_row3_1", + /* 42 */ "keylabel_for_south_slavic_row3_8", + /* 43 */ "more_keys_for_cyrillic_ie", + /* 44 */ "more_keys_for_cyrillic_i", + /* 45 */ "label_to_alpha_key", + /* 46 */ "single_quotes", + /* 47 */ "double_quotes", + /* 48 */ "single_angle_quotes", + /* 49 */ "double_angle_quotes", + /* 50 */ "more_keys_for_currency_dollar", + /* 51 */ "keylabel_for_currency_generic", + /* 52 */ "more_keys_for_currency_generic", + /* 53 */ "more_keys_for_punctuation", + /* 54 */ "more_keys_for_star", + /* 55 */ "more_keys_for_bullet", + /* 56 */ "more_keys_for_plus", + /* 57 */ "more_keys_for_left_parenthesis", + /* 58 */ "more_keys_for_right_parenthesis", + /* 59 */ "more_keys_for_less_than", + /* 60 */ "more_keys_for_greater_than", + /* 61 */ "more_keys_for_arabic_diacritics", + /* 62 */ "keyhintlabel_for_arabic_diacritics", + /* 63 */ "keylabel_for_symbols_1", + /* 64 */ "keylabel_for_symbols_2", + /* 65 */ "keylabel_for_symbols_3", + /* 66 */ "keylabel_for_symbols_4", + /* 67 */ "keylabel_for_symbols_5", + /* 68 */ "keylabel_for_symbols_6", + /* 69 */ "keylabel_for_symbols_7", + /* 70 */ "keylabel_for_symbols_8", + /* 71 */ "keylabel_for_symbols_9", + /* 72 */ "keylabel_for_symbols_0", + /* 73 */ "label_to_symbol_key", + /* 74 */ "label_to_symbol_with_microphone_key", + /* 75 */ "additional_more_keys_for_symbols_1", + /* 76 */ "additional_more_keys_for_symbols_2", + /* 77 */ "additional_more_keys_for_symbols_3", + /* 78 */ "additional_more_keys_for_symbols_4", + /* 79 */ "additional_more_keys_for_symbols_5", + /* 80 */ "additional_more_keys_for_symbols_6", + /* 81 */ "additional_more_keys_for_symbols_7", + /* 82 */ "additional_more_keys_for_symbols_8", + /* 83 */ "additional_more_keys_for_symbols_9", + /* 84 */ "additional_more_keys_for_symbols_0", + /* 85 */ "more_keys_for_symbols_1", + /* 86 */ "more_keys_for_symbols_2", + /* 87 */ "more_keys_for_symbols_3", + /* 88 */ "more_keys_for_symbols_4", + /* 89 */ "more_keys_for_symbols_5", + /* 90 */ "more_keys_for_symbols_6", + /* 91 */ "more_keys_for_symbols_7", + /* 92 */ "more_keys_for_symbols_8", + /* 93 */ "more_keys_for_symbols_9", + /* 94 */ "more_keys_for_symbols_0", + /* 95 */ "keylabel_for_comma", + /* 96 */ "more_keys_for_comma", + /* 97 */ "keylabel_for_symbols_question", + /* 98 */ "keylabel_for_symbols_semicolon", + /* 99 */ "keylabel_for_symbols_percent", + /* 100 */ "more_keys_for_symbols_exclamation", + /* 101 */ "more_keys_for_symbols_question", + /* 102 */ "more_keys_for_symbols_semicolon", + /* 103 */ "more_keys_for_symbols_percent", + /* 104 */ "keylabel_for_tablet_comma", + /* 105 */ "keyhintlabel_for_tablet_comma", + /* 106 */ "more_keys_for_tablet_comma", + /* 107 */ "keyhintlabel_for_tablet_period", + /* 108 */ "more_keys_for_tablet_period", + /* 109 */ "keylabel_for_apostrophe", + /* 110 */ "keyhintlabel_for_apostrophe", + /* 111 */ "more_keys_for_apostrophe", + /* 112 */ "more_keys_for_q", + /* 113 */ "more_keys_for_x", + /* 114 */ "keylabel_for_q", + /* 115 */ "keylabel_for_w", + /* 116 */ "keylabel_for_y", + /* 117 */ "keylabel_for_x", + /* 118 */ "keylabel_for_spanish_row2_10", + /* 119 */ "more_keys_for_am_pm", + /* 120 */ "settings_as_more_key", + /* 121 */ "shortcut_as_more_key", + /* 122 */ "action_next_as_more_key", + /* 123 */ "action_previous_as_more_key", + /* 124 */ "label_to_more_symbol_key", + /* 125 */ "label_to_more_symbol_for_tablet_key", + /* 126 */ "label_tab_key", + /* 127 */ "label_to_phone_numeric_key", + /* 128 */ "label_to_phone_symbols_key", + /* 129 */ "label_time_am", + /* 130 */ "label_time_pm", + /* 131 */ "label_to_symbol_key_pcqwerty", + /* 132 */ "keylabel_for_popular_domain", + /* 133 */ "more_keys_for_popular_domain", + /* 134 */ "more_keys_for_smiley", + /* 135 */ "single_laqm_raqm", + /* 136 */ "single_laqm_raqm_rtl", + /* 137 */ "single_raqm_laqm", + /* 138 */ "double_laqm_raqm", + /* 139 */ "double_laqm_raqm_rtl", + /* 140 */ "double_raqm_laqm", + /* 141 */ "single_lqm_rqm", + /* 142 */ "single_9qm_lqm", + /* 143 */ "single_9qm_rqm", + /* 144 */ "double_lqm_rqm", + /* 145 */ "double_9qm_lqm", + /* 146 */ "double_9qm_rqm", + /* 147 */ "more_keys_for_single_quote", + /* 148 */ "more_keys_for_double_quote", + /* 149 */ "more_keys_for_tablet_double_quote", }; private static final String EMPTY = ""; @@ -259,147 +262,147 @@ public final class KeyboardTextsSet { EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, - EMPTY, EMPTY, EMPTY, - /* ~41 */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~44 */ // Label for "switch to alphabetic" key. - /* 42 */ "ABC", - /* 43 */ "!text/single_lqm_rqm", - /* 44 */ "!text/double_lqm_rqm", - /* 45 */ "!text/single_laqm_raqm", - /* 46 */ "!text/double_laqm_raqm", + /* 45 */ "ABC", + /* 46 */ "!text/single_lqm_rqm", + /* 47 */ "!text/double_lqm_rqm", + /* 48 */ "!text/single_laqm_raqm", + /* 49 */ "!text/double_laqm_raqm", // U+00A2: "¢" CENT SIGN // U+00A3: "£" POUND SIGN // U+20AC: "€" EURO SIGN // U+00A5: "¥" YEN SIGN // U+20B1: "₱" PESO SIGN - /* 47 */ "\u00A2,\u00A3,\u20AC,\u00A5,\u20B1", - /* 48 */ "$", - /* 49 */ "$,\u00A2,\u20AC,\u00A3,\u00A5,\u20B1", - /* 50 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\\,,?,@,&,\\%,+,;,/,(,)", + /* 50 */ "\u00A2,\u00A3,\u20AC,\u00A5,\u20B1", + /* 51 */ "$", + /* 52 */ "$,\u00A2,\u20AC,\u00A3,\u00A5,\u20B1", + /* 53 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\\,,?,@,&,\\%,+,;,/,(,)", // U+2020: "†" DAGGER // U+2021: "‡" DOUBLE DAGGER // U+2605: "★" BLACK STAR - /* 51 */ "\u2020,\u2021,\u2605", + /* 54 */ "\u2020,\u2021,\u2605", // U+266A: "♪" EIGHTH NOTE // U+2665: "♥" BLACK HEART SUIT // U+2660: "♠" BLACK SPADE SUIT // U+2666: "♦" BLACK DIAMOND SUIT // U+2663: "♣" BLACK CLUB SUIT - /* 52 */ "\u266A,\u2665,\u2660,\u2666,\u2663", + /* 55 */ "\u266A,\u2665,\u2660,\u2666,\u2663", // U+00B1: "±" PLUS-MINUS SIGN - /* 53 */ "\u00B1", + /* 56 */ "\u00B1", // The all letters need to be mirrored are found at // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt - /* 54 */ "!fixedColumnOrder!3,<,{,[", - /* 55 */ "!fixedColumnOrder!3,>,},]", + /* 57 */ "!fixedColumnOrder!3,<,{,[", + /* 58 */ "!fixedColumnOrder!3,>,},]", // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK // U+2264: "≤" LESS-THAN OR EQUAL TO // U+2265: "≥" GREATER-THAN EQUAL TO // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - /* 56 */ "!fixedColumnOrder!3,\u2039,\u2264,\u00AB", - /* 57 */ "!fixedColumnOrder!3,\u203A,\u2265,\u00BB", - /* 58 */ EMPTY, - /* 59 */ EMPTY, - /* 60 */ "1", - /* 61 */ "2", - /* 62 */ "3", - /* 63 */ "4", - /* 64 */ "5", - /* 65 */ "6", - /* 66 */ "7", - /* 67 */ "8", - /* 68 */ "9", - /* 69 */ "0", + /* 59 */ "!fixedColumnOrder!3,\u2039,\u2264,\u00AB", + /* 60 */ "!fixedColumnOrder!3,\u203A,\u2265,\u00BB", + /* 61 */ EMPTY, + /* 62 */ EMPTY, + /* 63 */ "1", + /* 64 */ "2", + /* 65 */ "3", + /* 66 */ "4", + /* 67 */ "5", + /* 68 */ "6", + /* 69 */ "7", + /* 70 */ "8", + /* 71 */ "9", + /* 72 */ "0", // Label for "switch to symbols" key. - /* 70 */ "?123", + /* 73 */ "?123", // Label for "switch to symbols with microphone" key. This string shouldn't include the "mic" // part because it'll be appended by the code. - /* 71 */ "123", - /* 72~ */ + /* 74 */ "123", + /* 75~ */ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, - /* ~81 */ + /* ~84 */ // U+00B9: "¹" SUPERSCRIPT ONE // U+00BD: "½" VULGAR FRACTION ONE HALF // U+2153: "⅓" VULGAR FRACTION ONE THIRD // U+00BC: "¼" VULGAR FRACTION ONE QUARTER // U+215B: "⅛" VULGAR FRACTION ONE EIGHTH - /* 82 */ "\u00B9,\u00BD,\u2153,\u00BC,\u215B", + /* 85 */ "\u00B9,\u00BD,\u2153,\u00BC,\u215B", // U+00B2: "²" SUPERSCRIPT TWO // U+2154: "⅔" VULGAR FRACTION TWO THIRDS - /* 83 */ "\u00B2,\u2154", + /* 86 */ "\u00B2,\u2154", // U+00B3: "³" SUPERSCRIPT THREE // U+00BE: "¾" VULGAR FRACTION THREE QUARTERS // U+215C: "⅜" VULGAR FRACTION THREE EIGHTHS - /* 84 */ "\u00B3,\u00BE,\u215C", + /* 87 */ "\u00B3,\u00BE,\u215C", // U+2074: "⁴" SUPERSCRIPT FOUR - /* 85 */ "\u2074", + /* 88 */ "\u2074", // U+215D: "⅝" VULGAR FRACTION FIVE EIGHTHS - /* 86 */ "\u215D", - /* 87 */ EMPTY, - // U+215E: "⅞" VULGAR FRACTION SEVEN EIGHTHS - /* 88 */ "\u215E", - /* 89 */ EMPTY, + /* 89 */ "\u215D", /* 90 */ EMPTY, + // U+215E: "⅞" VULGAR FRACTION SEVEN EIGHTHS + /* 91 */ "\u215E", + /* 92 */ EMPTY, + /* 93 */ EMPTY, // U+207F: "ⁿ" SUPERSCRIPT LATIN SMALL LETTER N // U+2205: "∅" EMPTY SET - /* 91 */ "\u207F,\u2205", - /* 92 */ ",", - /* 93 */ EMPTY, - /* 94 */ "?", - /* 95 */ ";", - /* 96 */ "%", + /* 94 */ "\u207F,\u2205", + /* 95 */ ",", + /* 96 */ EMPTY, + /* 97 */ "?", + /* 98 */ ";", + /* 99 */ "%", // U+00A1: "¡" INVERTED EXCLAMATION MARK - /* 97 */ "\u00A1", + /* 100 */ "\u00A1", // U+00BF: "¿" INVERTED QUESTION MARK - /* 98 */ "\u00BF", - /* 99 */ EMPTY, + /* 101 */ "\u00BF", + /* 102 */ EMPTY, // U+2030: "‰" PER MILLE SIGN - /* 100 */ "\u2030", - /* 101 */ ",", - /* 102 */ "!", - /* 103 */ "!", - /* 104 */ "?", - /* 105 */ "?", - /* 106 */ "\'", - /* 107 */ "\"", - /* 108 */ "\"", - /* 109 */ EMPTY, - /* 110 */ EMPTY, - /* 111 */ "q", - /* 112 */ "w", - /* 113 */ "y", - /* 114 */ "x", + /* 103 */ "\u2030", + /* 104 */ ",", + /* 105 */ "!", + /* 106 */ "!", + /* 107 */ "?", + /* 108 */ "?", + /* 109 */ "\'", + /* 110 */ "\"", + /* 111 */ "\"", + /* 112 */ EMPTY, + /* 113 */ EMPTY, + /* 114 */ "q", + /* 115 */ "w", + /* 116 */ "y", + /* 117 */ "x", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - /* 115 */ "\u00F1", - /* 116 */ "!fixedColumnOrder!2,!hasLabels!,!text/label_time_am,!text/label_time_pm", - /* 117 */ "!icon/settings_key|!code/key_settings", - /* 118 */ "!icon/shortcut_key|!code/key_shortcut", - /* 119 */ "!hasLabels!,!text/label_next_key|!code/key_action_next", - /* 120 */ "!hasLabels!,!text/label_previous_key|!code/key_action_previous", + /* 118 */ "\u00F1", + /* 119 */ "!fixedColumnOrder!2,!hasLabels!,!text/label_time_am,!text/label_time_pm", + /* 120 */ "!icon/settings_key|!code/key_settings", + /* 121 */ "!icon/shortcut_key|!code/key_shortcut", + /* 122 */ "!hasLabels!,!text/label_next_key|!code/key_action_next", + /* 123 */ "!hasLabels!,!text/label_previous_key|!code/key_action_previous", // Label for "switch to more symbol" modifier key. Must be short to fit on key! - /* 121 */ "= \\ <", + /* 124 */ "= \\ <", // Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key! - /* 122 */ "~ \\ {", + /* 125 */ "~ \\ {", // Label for "Tab" key. Must be short to fit on key! - /* 123 */ "Tab", + /* 126 */ "Tab", // Label for "switch to phone numeric" key. Must be short to fit on key! - /* 124 */ "123", + /* 127 */ "123", // Label for "switch to phone symbols" key. Must be short to fit on key! // U+FF0A: "*" FULLWIDTH ASTERISK // U+FF03: "#" FULLWIDTH NUMBER SIGN - /* 125 */ "\uFF0A\uFF03", + /* 128 */ "\uFF0A\uFF03", // Key label for "ante meridiem" - /* 126 */ "AM", + /* 129 */ "AM", // Key label for "post meridiem" - /* 127 */ "PM", + /* 130 */ "PM", // Label for "switch to symbols" key on PC QWERTY layout - /* 128 */ "Sym", - /* 129 */ ".com", + /* 131 */ "Sym", + /* 132 */ ".com", // popular web domains for the locale - most popular, displayed on the keyboard - /* 130 */ "!hasLabels!,.net,.org,.gov,.edu", - /* 131 */ "!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ ", + /* 133 */ "!hasLabels!,.net,.org,.gov,.edu", + /* 134 */ "!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ ", // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK @@ -421,24 +424,24 @@ public final class KeyboardTextsSet { // The following each quotation mark pair consist of // <opening quotation mark>, <closing quotation mark> // and is named after (single|double)_<opening quotation mark>_<closing quotation mark>. - /* 132 */ "\u2039,\u203A", - /* 133 */ "\u2039|\u203A,\u203A|\u2039", - /* 134 */ "\u203A,\u2039", - /* 135 */ "\u00AB,\u00BB", - /* 136 */ "\u00AB|\u00BB,\u00BB|\u00AB", - /* 137 */ "\u00BB,\u00AB", + /* 135 */ "\u2039,\u203A", + /* 136 */ "\u2039|\u203A,\u203A|\u2039", + /* 137 */ "\u203A,\u2039", + /* 138 */ "\u00AB,\u00BB", + /* 139 */ "\u00AB|\u00BB,\u00BB|\u00AB", + /* 140 */ "\u00BB,\u00AB", // The following each quotation mark triplet consists of // <another quotation mark>, <opening quotation mark>, <closing quotation mark> // and is named after (single|double)_<opening quotation mark>_<closing quotation mark>. - /* 138 */ "\u201A,\u2018,\u2019", - /* 139 */ "\u2019,\u201A,\u2018", - /* 140 */ "\u2018,\u201A,\u2019", - /* 141 */ "\u201E,\u201C,\u201D", - /* 142 */ "\u201D,\u201E,\u201C", - /* 143 */ "\u201C,\u201E,\u201D", - /* 144 */ "!fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes", - /* 145 */ "!fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes", - /* 146 */ "!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes", + /* 141 */ "\u201A,\u2018,\u2019", + /* 142 */ "\u2019,\u201A,\u2018", + /* 143 */ "\u2018,\u201A,\u2019", + /* 144 */ "\u201E,\u201C,\u201D", + /* 145 */ "\u201D,\u201E,\u201C", + /* 146 */ "\u201C,\u201E,\u201D", + /* 147 */ "!fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes", + /* 148 */ "!fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes", + /* 149 */ "!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes", }; /* Language af: Afrikaans */ @@ -499,45 +502,45 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~41 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+0623: "ا" ARABIC LETTER ALEF // U+200C: ZERO WIDTH NON-JOINER // U+0628: "ب" ARABIC LETTER BEH // U+062C: "پ" ARABIC LETTER PEH - /* 42 */ "\u0623\u200C\u0628\u200C\u062C", - /* 43 */ null, - /* 44 */ null, - /* 45 */ "!text/single_laqm_raqm_rtl", - /* 46 */ "!text/double_laqm_raqm_rtl", - /* 47~ */ + /* 45 */ "\u0623\u200C\u0628\u200C\u062C", + /* 46 */ null, + /* 47 */ null, + /* 48 */ "!text/single_laqm_raqm_rtl", + /* 49 */ "!text/double_laqm_raqm_rtl", + /* 50~ */ null, null, null, - /* ~49 */ + /* ~52 */ // U+061F: "؟" ARABIC QUESTION MARK // U+060C: "،" ARABIC COMMA // U+061B: "؛" ARABIC SEMICOLON - /* 50 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(,)", + /* 53 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(,)", // U+2605: "★" BLACK STAR // U+066D: "٭" ARABIC FIVE POINTED STAR - /* 51 */ "\u2605,\u066D", + /* 54 */ "\u2605,\u066D", // U+266A: "♪" EIGHTH NOTE - /* 52 */ "\u266A", - /* 53 */ null, + /* 55 */ "\u266A", + /* 56 */ null, // The all letters need to be mirrored are found at // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt // U+FD3E: "﴾" ORNATE LEFT PARENTHESIS // U+FD3F: "﴿" ORNATE RIGHT PARENTHESIS - /* 54 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]", - /* 55 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[", + /* 57 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]", + /* 58 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[", // U+2264: "≤" LESS-THAN OR EQUAL TO // U+2265: "≥" GREATER-THAN EQUAL TO // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - /* 56 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB", - /* 57 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB", + /* 59 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB", + /* 60 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB", // U+0655: "ٕ" ARABIC HAMZA BELOW // U+0654: "ٔ" ARABIC HAMZA ABOVE // U+0652: "ْ" ARABIC SUKUN @@ -554,70 +557,115 @@ public final class KeyboardTextsSet { // U+0640: "ـ" ARABIC TATWEEL // In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. // Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly. - /* 58 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0654|\u0654, \u0652|\u0652, \u064D|\u064D, \u064C|\u064C, \u064B|\u064B, \u0651|\u0651, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u0650|\u0650, \u064F|\u064F, \u064E|\u064E,\u0640\u0640\u0640|\u0640", - /* 59 */ "\u0651", + /* 61 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0654|\u0654, \u0652|\u0652, \u064D|\u064D, \u064C|\u064C, \u064B|\u064B, \u0651|\u0651, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u0650|\u0650, \u064F|\u064F, \u064E|\u064E,\u0640\u0640\u0640|\u0640", + /* 62 */ "\u0651", // U+0661: "١" ARABIC-INDIC DIGIT ONE - /* 60 */ "\u0661", + /* 63 */ "\u0661", // U+0662: "٢" ARABIC-INDIC DIGIT TWO - /* 61 */ "\u0662", + /* 64 */ "\u0662", // U+0663: "٣" ARABIC-INDIC DIGIT THREE - /* 62 */ "\u0663", + /* 65 */ "\u0663", // U+0664: "٤" ARABIC-INDIC DIGIT FOUR - /* 63 */ "\u0664", + /* 66 */ "\u0664", // U+0665: "٥" ARABIC-INDIC DIGIT FIVE - /* 64 */ "\u0665", + /* 67 */ "\u0665", // U+0666: "٦" ARABIC-INDIC DIGIT SIX - /* 65 */ "\u0666", + /* 68 */ "\u0666", // U+0667: "٧" ARABIC-INDIC DIGIT SEVEN - /* 66 */ "\u0667", + /* 69 */ "\u0667", // U+0668: "٨" ARABIC-INDIC DIGIT EIGHT - /* 67 */ "\u0668", + /* 70 */ "\u0668", // U+0669: "٩" ARABIC-INDIC DIGIT NINE - /* 68 */ "\u0669", + /* 71 */ "\u0669", // U+0660: "٠" ARABIC-INDIC DIGIT ZERO - /* 69 */ "\u0660", + /* 72 */ "\u0660", // Label for "switch to symbols" key. // U+061F: "؟" ARABIC QUESTION MARK - /* 70 */ "\u0663\u0662\u0661\u061F", + /* 73 */ "\u0663\u0662\u0661\u061F", // Label for "switch to symbols with microphone" key. This string shouldn't include the "mic" // part because it'll be appended by the code. - /* 71 */ "\u0663\u0662\u0661", - /* 72 */ "1", - /* 73 */ "2", - /* 74 */ "3", - /* 75 */ "4", - /* 76 */ "5", - /* 77 */ "6", - /* 78 */ "7", - /* 79 */ "8", - /* 80 */ "9", + /* 74 */ "\u0663\u0662\u0661", + /* 75 */ "1", + /* 76 */ "2", + /* 77 */ "3", + /* 78 */ "4", + /* 79 */ "5", + /* 80 */ "6", + /* 81 */ "7", + /* 82 */ "8", + /* 83 */ "9", // U+066B: "٫" ARABIC DECIMAL SEPARATOR // U+066C: "٬" ARABIC THOUSANDS SEPARATOR - /* 81 */ "0,\u066B,\u066C", - /* 82~ */ + /* 84 */ "0,\u066B,\u066C", + /* 85~ */ null, null, null, null, null, null, null, null, null, null, - /* ~91 */ + /* ~94 */ // U+060C: "،" ARABIC COMMA - /* 92 */ "\u060C", - /* 93 */ "\\,", - /* 94 */ "\u061F", - /* 95 */ "\u061B", + /* 95 */ "\u060C", + /* 96 */ "\\,", + /* 97 */ "\u061F", + /* 98 */ "\u061B", // U+066A: "٪" ARABIC PERCENT SIGN - /* 96 */ "\u066A", - /* 97 */ null, - /* 98 */ "?", - /* 99 */ ";", + /* 99 */ "\u066A", + /* 100 */ null, + /* 101 */ "?", + /* 102 */ ";", // U+2030: "‰" PER MILLE SIGN - /* 100 */ "\\%,\u2030", - /* 101~ */ + /* 103 */ "\\%,\u2030", + /* 104~ */ null, null, null, null, null, - /* ~105 */ + /* ~108 */ // U+060C: "،" ARABIC COMMA // U+061B: "؛" ARABIC SEMICOLON // U+061F: "؟" ARABIC QUESTION MARK - /* 106 */ "\u060C", - /* 107 */ "\u061F", - /* 108 */ "\u061F,\u061B,!,:,-,/,\',\"", + /* 109 */ "\u060C", + /* 110 */ "\u061F", + /* 111 */ "\u061F,\u061B,!,:,-,/,\',\"", + }; + + /* Language az: Azerbaijani */ + private static final String[] LANGUAGE_az = { + /* 0 */ null, + // U+0259: "ə" LATIN SMALL LETTER SCHWA + /* 1 */ "\u0259", + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* 2 */ "\u0131,\u00EE,\u00EF,\u00EC,\u00ED,\u012F,\u012B", + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + /* 3 */ "\u00F6,\u00F4,\u0153,\u00F2,\u00F3,\u00F5,\u00F8,\u014D", + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + /* 4 */ "\u00FC,\u00FB,\u00F9,\u00FA,\u016B", + // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA + // U+00DF: "ß" LATIN SMALL LETTER SHARP S + // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE + // U+0161: "š" LATIN SMALL LETTER S WITH CARON + /* 5 */ "\u015F,\u00DF,\u015B,\u0161", + /* 6 */ null, + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + /* 7 */ "\u00E7,\u0107,\u010D", + /* 8~ */ + null, null, null, null, null, null, null, + /* ~14 */ + // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE + /* 15 */ "\u011F", }; /* Language be: Belarusian */ @@ -637,23 +685,23 @@ public final class KeyboardTextsSet { // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I /* 29 */ "\u0456", /* 30~ */ - null, null, null, null, null, - /* ~34 */ + null, null, null, null, null, null, null, + /* ~36 */ // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 35 */ "\u044A", - /* 36~ */ - null, null, null, null, - /* ~39 */ + /* 37 */ "\u044A", + /* 38~ */ + null, null, null, null, null, + /* ~42 */ // U+0451: "ё" CYRILLIC SMALL LETTER IO - /* 40 */ "\u0451", - /* 41 */ null, + /* 43 */ "\u0451", + /* 44 */ null, // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 42 */ "\u0410\u0411\u0412", - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", + /* 45 */ "\u0410\u0411\u0412", + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", }; /* Language bg: Bulgarian */ @@ -661,16 +709,16 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~41 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 42 */ "\u0410\u0411\u0412", - /* 43 */ null, + /* 45 */ "\u0410\u0411\u0412", + /* 46 */ null, // single_quotes of Bulgarian is default single_quotes_right_left. - /* 44 */ "!text/double_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", }; /* Language ca: Catalan */ @@ -804,11 +852,12 @@ public final class KeyboardTextsSet { /* 13~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", - /* 45 */ "!text/single_raqm_laqm", - /* 46 */ "!text/double_raqm_laqm", + null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", + /* 48 */ "!text/single_raqm_laqm", + /* 49 */ "!text/double_raqm_laqm", }; /* Language da: Danish */ @@ -872,12 +921,12 @@ public final class KeyboardTextsSet { /* 24 */ "\u00F6", /* 25~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", - /* 45 */ "!text/single_raqm_laqm", - /* 46 */ "!text/double_raqm_laqm", + null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", + /* 48 */ "!text/single_raqm_laqm", + /* 49 */ "!text/double_raqm_laqm", }; /* Language de: German */ @@ -923,12 +972,12 @@ public final class KeyboardTextsSet { /* 7~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", - /* 45 */ "!text/single_raqm_laqm", - /* 46 */ "!text/double_raqm_laqm", + null, null, null, null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", + /* 48 */ "!text/single_raqm_laqm", + /* 49 */ "!text/double_raqm_laqm", }; /* Language el: Greek */ @@ -936,13 +985,13 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~41 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+0391: "Α" GREEK CAPITAL LETTER ALPHA // U+0392: "Β" GREEK CAPITAL LETTER BETA // U+0393: "Γ" GREEK CAPITAL LETTER GAMMA - /* 42 */ "\u0391\u0392\u0393", + /* 45 */ "\u0391\u0392\u0393", }; /* Language en: English */ @@ -1113,20 +1162,21 @@ public final class KeyboardTextsSet { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~108 */ - /* 109 */ "q", - /* 110 */ "x", + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, + /* ~111 */ + /* 112 */ "q", + /* 113 */ "x", // U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX - /* 111 */ "\u015D", + /* 114 */ "\u015D", // U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX - /* 112 */ "\u011D", + /* 115 */ "\u011D", // U+016D: "ŭ" LATIN SMALL LETTER U WITH BREVE - /* 113 */ "\u016D", + /* 116 */ "\u016D", // U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX - /* 114 */ "\u0109", + /* 117 */ "\u0109", // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX - /* 115 */ "\u0135", + /* 118 */ "\u0135", }; /* Language es: Spanish */ @@ -1184,25 +1234,25 @@ public final class KeyboardTextsSet { /* 8~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~49 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~52 */ // U+00A1: "¡" INVERTED EXCLAMATION MARK // U+00BF: "¿" INVERTED QUESTION MARK - /* 50 */ "!fixedColumnOrder!9,\u00A1,\",\',#,-,:,!,\\,,?,\u00BF,@,&,\\%,+,;,/,(,)", - /* 51~ */ + /* 53 */ "!fixedColumnOrder!9,\u00A1,\",\',#,-,:,!,\\,,?,\u00BF,@,&,\\%,+,;,/,(,)", + /* 54~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~102 */ + /* ~105 */ // U+00A1: "¡" INVERTED EXCLAMATION MARK - /* 103 */ "!,\u00A1", - /* 104 */ null, + /* 106 */ "!,\u00A1", + /* 107 */ null, // U+00BF: "¿" INVERTED QUESTION MARK - /* 105 */ "?,\u00BF", - /* 106 */ "\"", - /* 107 */ "\'", - /* 108 */ "\'", + /* 108 */ "?,\u00BF", + /* 109 */ "\"", + /* 110 */ "\'", + /* 111 */ "\'", }; /* Language et: Estonian */ @@ -1305,10 +1355,10 @@ public final class KeyboardTextsSet { /* 23 */ "\u00F5", /* 24~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", + null, null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", }; /* Language fa: Persian */ @@ -1316,45 +1366,45 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~41 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+0627: "ا" ARABIC LETTER ALEF // U+200C: ZERO WIDTH NON-JOINER // U+0628: "ب" ARABIC LETTER BEH // U+067E: "پ" ARABIC LETTER PEH - /* 42 */ "\u0627\u200C\u0628\u200C\u067E", - /* 43 */ null, - /* 44 */ null, - /* 45 */ "!text/single_laqm_raqm_rtl", - /* 46 */ "!text/double_laqm_raqm_rtl", - /* 47~ */ + /* 45 */ "\u0627\u200C\u0628\u200C\u067E", + /* 46 */ null, + /* 47 */ null, + /* 48 */ "!text/single_laqm_raqm_rtl", + /* 49 */ "!text/double_laqm_raqm_rtl", + /* 50~ */ null, null, null, - /* ~49 */ + /* ~52 */ // U+061F: "؟" ARABIC QUESTION MARK // U+060C: "،" ARABIC COMMA // U+061B: "؛" ARABIC SEMICOLON - /* 50 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(,)", + /* 53 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(,)", // U+2605: "★" BLACK STAR // U+066D: "٭" ARABIC FIVE POINTED STAR - /* 51 */ "\u2605,\u066D", + /* 54 */ "\u2605,\u066D", // U+266A: "♪" EIGHTH NOTE - /* 52 */ "\u266A", - /* 53 */ null, + /* 55 */ "\u266A", + /* 56 */ null, // The all letters need to be mirrored are found at // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt // U+FD3E: "﴾" ORNATE LEFT PARENTHESIS // U+FD3F: "﴿" ORNATE RIGHT PARENTHESIS - /* 54 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]", - /* 55 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[", + /* 57 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]", + /* 58 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[", // U+2264: "≤" LESS-THAN OR EQUAL TO // U+2265: "≥" GREATER-THAN EQUAL TO // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - /* 56 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,<|>", - /* 57 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,>|<", + /* 59 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,<|>", + /* 60 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,>|<", // U+0655: "ٕ" ARABIC HAMZA BELOW // U+0652: "ْ" ARABIC SUKUN // U+0651: "ّ" ARABIC SHADDA @@ -1371,74 +1421,74 @@ public final class KeyboardTextsSet { // U+0640: "ـ" ARABIC TATWEEL // In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. // Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly. - /* 58 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0652|\u0652, \u0651|\u0651, \u064C|\u064C, \u064D|\u064D, \u064B|\u064B, \u0654|\u0654, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u064F|\u064F, \u0650|\u0650, \u064E|\u064E,\u0640\u0640\u0640|\u0640", - /* 59 */ "\u064B", + /* 61 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0652|\u0652, \u0651|\u0651, \u064C|\u064C, \u064D|\u064D, \u064B|\u064B, \u0654|\u0654, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u064F|\u064F, \u0650|\u0650, \u064E|\u064E,\u0640\u0640\u0640|\u0640", + /* 62 */ "\u064B", // U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE - /* 60 */ "\u06F1", + /* 63 */ "\u06F1", // U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO - /* 61 */ "\u06F2", + /* 64 */ "\u06F2", // U+06F3: "۳" EXTENDED ARABIC-INDIC DIGIT THREE - /* 62 */ "\u06F3", + /* 65 */ "\u06F3", // U+06F4: "۴" EXTENDED ARABIC-INDIC DIGIT FOUR - /* 63 */ "\u06F4", + /* 66 */ "\u06F4", // U+06F5: "۵" EXTENDED ARABIC-INDIC DIGIT FIVE - /* 64 */ "\u06F5", + /* 67 */ "\u06F5", // U+06F6: "۶" EXTENDED ARABIC-INDIC DIGIT SIX - /* 65 */ "\u06F6", + /* 68 */ "\u06F6", // U+06F7: "۷" EXTENDED ARABIC-INDIC DIGIT SEVEN - /* 66 */ "\u06F7", + /* 69 */ "\u06F7", // U+06F8: "۸" EXTENDED ARABIC-INDIC DIGIT EIGHT - /* 67 */ "\u06F8", + /* 70 */ "\u06F8", // U+06F9: "۹" EXTENDED ARABIC-INDIC DIGIT NINE - /* 68 */ "\u06F9", + /* 71 */ "\u06F9", // U+06F0: "۰" EXTENDED ARABIC-INDIC DIGIT ZERO - /* 69 */ "\u06F0", + /* 72 */ "\u06F0", // Label for "switch to symbols" key. // U+061F: "؟" ARABIC QUESTION MARK - /* 70 */ "\u06F3\u06F2\u06F1\u061F", + /* 73 */ "\u06F3\u06F2\u06F1\u061F", // Label for "switch to symbols with microphone" key. This string shouldn't include the "mic" // part because it'll be appended by the code. - /* 71 */ "\u06F3\u06F2\u06F1", - /* 72 */ "1", - /* 73 */ "2", - /* 74 */ "3", - /* 75 */ "4", - /* 76 */ "5", - /* 77 */ "6", - /* 78 */ "7", - /* 79 */ "8", - /* 80 */ "9", + /* 74 */ "\u06F3\u06F2\u06F1", + /* 75 */ "1", + /* 76 */ "2", + /* 77 */ "3", + /* 78 */ "4", + /* 79 */ "5", + /* 80 */ "6", + /* 81 */ "7", + /* 82 */ "8", + /* 83 */ "9", // U+066B: "٫" ARABIC DECIMAL SEPARATOR // U+066C: "٬" ARABIC THOUSANDS SEPARATOR - /* 81 */ "0,\u066B,\u066C", - /* 82~ */ + /* 84 */ "0,\u066B,\u066C", + /* 85~ */ null, null, null, null, null, null, null, null, null, null, - /* ~91 */ + /* ~94 */ // U+060C: "،" ARABIC COMMA - /* 92 */ "\u060C", - /* 93 */ "\\,", - /* 94 */ "\u061F", - /* 95 */ "\u061B", + /* 95 */ "\u060C", + /* 96 */ "\\,", + /* 97 */ "\u061F", + /* 98 */ "\u061B", // U+066A: "٪" ARABIC PERCENT SIGN - /* 96 */ "\u066A", - /* 97 */ null, - /* 98 */ "?", - /* 99 */ ";", + /* 99 */ "\u066A", + /* 100 */ null, + /* 101 */ "?", + /* 102 */ ";", // U+2030: "‰" PER MILLE SIGN - /* 100 */ "\\%,\u2030", + /* 103 */ "\\%,\u2030", // U+060C: "،" ARABIC COMMA // U+061B: "؛" ARABIC SEMICOLON // U+061F: "؟" ARABIC QUESTION MARK // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - /* 101 */ "\u060C", - /* 102 */ "!", - /* 103 */ "!,\\,", - /* 104 */ "\u061F", - /* 105 */ "\u061F,?", - /* 106 */ "\u060C", + /* 104 */ "\u060C", + /* 105 */ "!", + /* 106 */ "!,\\,", /* 107 */ "\u061F", - /* 108 */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\u00AB|\u00BB,\u00BB|\u00AB", + /* 108 */ "\u061F,?", + /* 109 */ "\u060C", + /* 110 */ "\u061F", + /* 111 */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\u00AB|\u00BB,\u00BB|\u00AB", }; /* Language fi: Finnish */ @@ -1546,56 +1596,56 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~41 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+0915: "क" DEVANAGARI LETTER KA // U+0916: "ख" DEVANAGARI LETTER KHA // U+0917: "ग" DEVANAGARI LETTER GA - /* 42 */ "\u0915\u0916\u0917", - /* 43~ */ + /* 45 */ "\u0915\u0916\u0917", + /* 46~ */ null, null, null, null, null, - /* ~47 */ + /* ~50 */ // U+20B9: "₹" INDIAN RUPEE SIGN - /* 48 */ "\u20B9", - /* 49~ */ + /* 51 */ "\u20B9", + /* 52~ */ null, null, null, null, null, null, null, null, null, null, null, - /* ~59 */ + /* ~62 */ // U+0967: "१" DEVANAGARI DIGIT ONE - /* 60 */ "\u0967", + /* 63 */ "\u0967", // U+0968: "२" DEVANAGARI DIGIT TWO - /* 61 */ "\u0968", + /* 64 */ "\u0968", // U+0969: "३" DEVANAGARI DIGIT THREE - /* 62 */ "\u0969", + /* 65 */ "\u0969", // U+096A: "४" DEVANAGARI DIGIT FOUR - /* 63 */ "\u096A", + /* 66 */ "\u096A", // U+096B: "५" DEVANAGARI DIGIT FIVE - /* 64 */ "\u096B", + /* 67 */ "\u096B", // U+096C: "६" DEVANAGARI DIGIT SIX - /* 65 */ "\u096C", + /* 68 */ "\u096C", // U+096D: "७" DEVANAGARI DIGIT SEVEN - /* 66 */ "\u096D", + /* 69 */ "\u096D", // U+096E: "८" DEVANAGARI DIGIT EIGHT - /* 67 */ "\u096E", + /* 70 */ "\u096E", // U+096F: "९" DEVANAGARI DIGIT NINE - /* 68 */ "\u096F", + /* 71 */ "\u096F", // U+0966: "०" DEVANAGARI DIGIT ZERO - /* 69 */ "\u0966", + /* 72 */ "\u0966", // Label for "switch to symbols" key. - /* 70 */ "?\u0967\u0968\u0969", + /* 73 */ "?\u0967\u0968\u0969", // Label for "switch to symbols with microphone" key. This string shouldn't include the "mic" // part because it'll be appended by the code. - /* 71 */ "\u0967\u0968\u0969", - /* 72 */ "1", - /* 73 */ "2", - /* 74 */ "3", - /* 75 */ "4", - /* 76 */ "5", - /* 77 */ "6", - /* 78 */ "7", - /* 79 */ "8", - /* 80 */ "9", - /* 81 */ "0", + /* 74 */ "\u0967\u0968\u0969", + /* 75 */ "1", + /* 76 */ "2", + /* 77 */ "3", + /* 78 */ "4", + /* 79 */ "5", + /* 80 */ "6", + /* 81 */ "7", + /* 82 */ "8", + /* 83 */ "9", + /* 84 */ "0", }; /* Language hr: Croatian */ @@ -1626,11 +1676,12 @@ public final class KeyboardTextsSet { /* 13~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_rqm", - /* 44 */ "!text/double_9qm_rqm", - /* 45 */ "!text/single_raqm_laqm", - /* 46 */ "!text/double_raqm_laqm", + null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_rqm", + /* 47 */ "!text/double_9qm_rqm", + /* 48 */ "!text/single_raqm_laqm", + /* 49 */ "!text/double_raqm_laqm", }; /* Language hu: Hungarian */ @@ -1679,12 +1730,12 @@ public final class KeyboardTextsSet { /* 5~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_rqm", - /* 44 */ "!text/double_9qm_rqm", - /* 45 */ "!text/single_raqm_laqm", - /* 46 */ "!text/double_raqm_laqm", + null, null, null, null, null, null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_rqm", + /* 47 */ "!text/double_9qm_rqm", + /* 48 */ "!text/single_raqm_laqm", + /* 49 */ "!text/double_raqm_laqm", }; /* Language is: Icelandic */ @@ -1750,10 +1801,10 @@ public final class KeyboardTextsSet { /* 22 */ "\u00FE", /* 23~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", + null, null, null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", }; /* Language it: Italian */ @@ -1806,13 +1857,13 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~41 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+05D0: "א" HEBREW LETTER ALEF // U+05D1: "ב" HEBREW LETTER BET // U+05D2: "ג" HEBREW LETTER GIMEL - /* 42 */ "\u05D0\u05D1\u05D2", + /* 45 */ "\u05D0\u05D1\u05D2", // The following characters don't need BIDI mirroring. // U+2018: "‘" LEFT SINGLE QUOTATION MARK // U+2019: "’" RIGHT SINGLE QUOTATION MARK @@ -1820,31 +1871,31 @@ public final class KeyboardTextsSet { // U+201C: "“" LEFT DOUBLE QUOTATION MARK // U+201D: "”" RIGHT DOUBLE QUOTATION MARK // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK - /* 43 */ "\u2018,\u2019,\u201A", - /* 44 */ "\u201C,\u201D,\u201E", - /* 45 */ "!text/single_laqm_raqm_rtl", - /* 46 */ "!text/double_laqm_raqm_rtl", - /* 47~ */ + /* 46 */ "\u2018,\u2019,\u201A", + /* 47 */ "\u201C,\u201D,\u201E", + /* 48 */ "!text/single_laqm_raqm_rtl", + /* 49 */ "!text/double_laqm_raqm_rtl", + /* 50~ */ null, null, null, null, - /* ~50 */ + /* ~53 */ // U+2605: "★" BLACK STAR - /* 51 */ "\u2605", - /* 52 */ null, + /* 54 */ "\u2605", + /* 55 */ null, // U+00B1: "±" PLUS-MINUS SIGN // U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN - /* 53 */ "\u00B1,\uFB29", + /* 56 */ "\u00B1,\uFB29", // The all letters need to be mirrored are found at // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt - /* 54 */ "!fixedColumnOrder!3,<|>,{|},[|]", - /* 55 */ "!fixedColumnOrder!3,>|<,}|{,]|[", + /* 57 */ "!fixedColumnOrder!3,<|>,{|},[|]", + /* 58 */ "!fixedColumnOrder!3,>|<,}|{,]|[", // U+2264: "≤" LESS-THAN OR EQUAL TO // U+2265: "≥" GREATER-THAN EQUAL TO // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - /* 56 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB", - /* 57 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB", + /* 59 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB", + /* 60 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB", }; /* Language ka: Georgian */ @@ -1852,15 +1903,63 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~41 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+10D0: "ა" GEORGIAN LETTER AN // U+10D1: "ბ" GEORGIAN LETTER BAN // U+10D2: "გ" GEORGIAN LETTER GAN - /* 42 */ "\u10D0\u10D1\u10D2", - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", + /* 45 */ "\u10D0\u10D1\u10D2", + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", + }; + + /* Language kk: Kazakh */ + private static final String[] LANGUAGE_kk = { + /* 0~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, + /* ~24 */ + // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA + /* 25 */ "\u0449", + // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN + /* 26 */ "\u044A", + // U+044B: "ы" CYRILLIC SMALL LETTER YERU + /* 27 */ "\u044B", + // U+044D: "э" CYRILLIC SMALL LETTER E + /* 28 */ "\u044D", + // U+0438: "и" CYRILLIC SMALL LETTER I + /* 29 */ "\u0438", + // U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U + // U+04B1: "ұ" CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE + /* 30 */ "\u04AF,\u04B1", + // U+049B: "қ" CYRILLIC SMALL LETTER KA WITH DESCENDER + /* 31 */ "\u049B", + // U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER + /* 32 */ "\u04A3", + // U+0493: "ғ" CYRILLIC SMALL LETTER GHE WITH STROKE + /* 33 */ "\u0493", + // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I + /* 34 */ "\u0456", + // U+04D9: "ә" CYRILLIC SMALL LETTER SCHWA + /* 35 */ "\u04D9", + // U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O + /* 36 */ "\u04E9", + // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN + /* 37 */ "\u044A", + // U+04BB: "һ" CYRILLIC SMALL LETTER SHHA + /* 38 */ "\u04BB", + /* 39~ */ + null, null, null, null, + /* ~42 */ + // U+0451: "ё" CYRILLIC SMALL LETTER IO + /* 43 */ "\u0451", + /* 44 */ null, + // Label for "switch to alphabetic" key. + // U+0410: "А" CYRILLIC CAPITAL LETTER A + // U+0411: "Б" CYRILLIC CAPITAL LETTER BE + // U+0412: "В" CYRILLIC CAPITAL LETTER VE + /* 45 */ "\u0410\u0411\u0412", }; /* Language ky: Kirghiz */ @@ -1881,25 +1980,27 @@ public final class KeyboardTextsSet { /* 29 */ "\u0438", // U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U /* 30 */ "\u04AF", + /* 31 */ null, // U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER - /* 31 */ "\u04A3", - /* 32 */ null, - /* 33 */ null, + /* 32 */ "\u04A3", + /* 33~ */ + null, null, null, + /* ~35 */ // U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O - /* 34 */ "\u04E9", + /* 36 */ "\u04E9", // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 35 */ "\u044A", - /* 36~ */ - null, null, null, null, - /* ~39 */ + /* 37 */ "\u044A", + /* 38~ */ + null, null, null, null, null, + /* ~42 */ // U+0451: "ё" CYRILLIC SMALL LETTER IO - /* 40 */ "\u0451", - /* 41 */ null, + /* 43 */ "\u0451", + /* 44 */ null, // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 42 */ "\u0410\u0411\u0412", + /* 45 */ "\u0410\u0411\u0412", }; /* Language lt: Lithuanian */ @@ -1992,10 +2093,10 @@ public final class KeyboardTextsSet { /* 15 */ "\u0123,\u011F", /* 16~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", }; /* Language lv: Latvian */ @@ -2087,10 +2188,10 @@ public final class KeyboardTextsSet { /* 15 */ "\u0123,\u011F", /* 16~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", }; /* Language mk: Macedonian */ @@ -2098,27 +2199,27 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, - /* ~35 */ + null, null, null, null, null, null, null, null, null, + /* ~38 */ // U+0455: "ѕ" CYRILLIC SMALL LETTER DZE - /* 36 */ "\u0455", + /* 39 */ "\u0455", // U+045C: "ќ" CYRILLIC SMALL LETTER KJE - /* 37 */ "\u045C", + /* 40 */ "\u045C", // U+0437: "з" CYRILLIC SMALL LETTER ZE - /* 38 */ "\u0437", + /* 41 */ "\u0437", // U+0453: "ѓ" CYRILLIC SMALL LETTER GJE - /* 39 */ "\u0453", + /* 42 */ "\u0453", // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE - /* 40 */ "\u0450", + /* 43 */ "\u0450", // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE - /* 41 */ "\u045D", + /* 44 */ "\u045D", // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 42 */ "\u0410\u0411\u0412", - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", + /* 45 */ "\u0410\u0411\u0412", + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", }; /* Language mn: Mongolian */ @@ -2126,18 +2227,18 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~41 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 42 */ "\u0410\u0411\u0412", - /* 43~ */ + /* 45 */ "\u0410\u0411\u0412", + /* 46~ */ null, null, null, null, null, - /* ~47 */ + /* ~50 */ // U+20AE: "₮" TUGRIK SIGN - /* 48 */ "\u20AE", + /* 51 */ "\u20AE", }; /* Language nb: Norwegian Bokmål */ @@ -2187,10 +2288,10 @@ public final class KeyboardTextsSet { /* 24 */ "\u00E4", /* 25~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_rqm", - /* 44 */ "!text/double_9qm_rqm", + null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_rqm", + /* 47 */ "!text/double_9qm_rqm", }; /* Language nl: Dutch */ @@ -2245,10 +2346,10 @@ public final class KeyboardTextsSet { /* 9~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_rqm", - /* 44 */ "!text/double_9qm_rqm", + null, null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_rqm", + /* 47 */ "!text/double_9qm_rqm", }; /* Language pl: Polish */ @@ -2305,10 +2406,11 @@ public final class KeyboardTextsSet { /* 14 */ "\u0142", /* 15~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_rqm", - /* 44 */ "!text/double_9qm_rqm", + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, + /* ~45 */ + /* 46 */ "!text/single_9qm_rqm", + /* 47 */ "!text/double_9qm_rqm", }; /* Language pt: Portuguese */ @@ -2411,10 +2513,10 @@ public final class KeyboardTextsSet { /* 12~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, - /* ~42 */ - /* 43 */ "!text/single_9qm_rqm", - /* 44 */ "!text/double_9qm_rqm", + null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_rqm", + /* 47 */ "!text/double_9qm_rqm", }; /* Language ru: Russian */ @@ -2434,23 +2536,23 @@ public final class KeyboardTextsSet { // U+0438: "и" CYRILLIC SMALL LETTER I /* 29 */ "\u0438", /* 30~ */ - null, null, null, null, null, - /* ~34 */ + null, null, null, null, null, null, null, + /* ~36 */ // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 35 */ "\u044A", - /* 36~ */ - null, null, null, null, - /* ~39 */ + /* 37 */ "\u044A", + /* 38~ */ + null, null, null, null, null, + /* ~42 */ // U+0451: "ё" CYRILLIC SMALL LETTER IO - /* 40 */ "\u0451", - /* 41 */ null, + /* 43 */ "\u0451", + /* 44 */ null, // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 42 */ "\u0410\u0411\u0412", - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", + /* 45 */ "\u0410\u0411\u0412", + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", }; /* Language sk: Slovak */ @@ -2543,12 +2645,12 @@ public final class KeyboardTextsSet { /* 15 */ "\u0123,\u011F", /* 16~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", - /* 45 */ "!text/single_raqm_laqm", - /* 46 */ "!text/double_raqm_laqm", + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", + /* 48 */ "!text/single_raqm_laqm", + /* 49 */ "!text/double_raqm_laqm", }; /* Language sl: Slovenian */ @@ -2572,11 +2674,12 @@ public final class KeyboardTextsSet { /* 13~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~42 */ - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", - /* 45 */ "!text/single_raqm_laqm", - /* 46 */ "!text/double_raqm_laqm", + null, null, null, + /* ~45 */ + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", + /* 48 */ "!text/single_raqm_laqm", + /* 49 */ "!text/double_raqm_laqm", }; /* Language sr: Serbian */ @@ -2584,8 +2687,8 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, - /* ~35 */ + null, null, null, null, null, null, null, null, null, + /* ~38 */ // TODO: Move these to sr-Latn once we can handle IETF language tag with script name specified. // BEGIN: More keys definitions for Serbian (Latin) // U+0161: "š" LATIN SMALL LETTER S WITH CARON @@ -2605,27 +2708,27 @@ public final class KeyboardTextsSet { // END: More keys definitions for Serbian (Latin) // BEGIN: More keys definitions for Serbian (Cyrillic) // U+0437: "з" CYRILLIC SMALL LETTER ZE - /* 36 */ "\u0437", + /* 39 */ "\u0437", // U+045B: "ћ" CYRILLIC SMALL LETTER TSHE - /* 37 */ "\u045B", + /* 40 */ "\u045B", // U+0455: "ѕ" CYRILLIC SMALL LETTER DZE - /* 38 */ "\u0455", + /* 41 */ "\u0455", // U+0452: "ђ" CYRILLIC SMALL LETTER DJE - /* 39 */ "\u0452", + /* 42 */ "\u0452", // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE - /* 40 */ "\u0450", + /* 43 */ "\u0450", // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE - /* 41 */ "\u045D", + /* 44 */ "\u045D", // END: More keys definitions for Serbian (Cyrillic) // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 42 */ "\u0410\u0411\u0412", - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", - /* 45 */ "!text/single_raqm_laqm", - /* 46 */ "!text/double_raqm_laqm", + /* 45 */ "\u0410\u0411\u0412", + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", + /* 48 */ "!text/single_raqm_laqm", + /* 49 */ "!text/double_raqm_laqm", }; /* Language sv: Swedish */ @@ -2670,10 +2773,10 @@ public final class KeyboardTextsSet { /* 24 */ "\u00E6", /* 25~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, - /* ~44 */ - /* 45 */ "!text/single_raqm_laqm", - /* 46 */ "!text/double_raqm_laqm", + null, null, null, null, null, null, null, null, + /* ~47 */ + /* 48 */ "!text/single_raqm_laqm", + /* 49 */ "!text/double_raqm_laqm", }; /* Language sw: Swahili */ @@ -2732,18 +2835,18 @@ public final class KeyboardTextsSet { /* 0~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~41 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+0E01: "ก" THAI CHARACTER KO KAI // U+0E02: "ข" THAI CHARACTER KHO KHAI // U+0E04: "ค" THAI CHARACTER KHO KHWAI - /* 42 */ "\u0E01\u0E02\u0E04", - /* 43~ */ + /* 45 */ "\u0E01\u0E02\u0E04", + /* 46~ */ null, null, null, null, null, - /* ~47 */ + /* ~50 */ // U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT - /* 48 */ "\u0E3F", + /* 51 */ "\u0E3F", }; /* Language tl: Tagalog */ @@ -2861,30 +2964,32 @@ public final class KeyboardTextsSet { /* 28 */ "\u0454", // U+0438: "и" CYRILLIC SMALL LETTER I /* 29 */ "\u0438", - /* 30 */ null, - /* 31 */ null, + /* 30~ */ + null, null, null, + /* ~32 */ // U+0491: "ґ" CYRILLIC SMALL LETTER GHE WITH UPTURN - /* 32 */ "\u0491", + /* 33 */ "\u0491", // U+0457: "ї" CYRILLIC SMALL LETTER YI - /* 33 */ "\u0457", - /* 34 */ null, + /* 34 */ "\u0457", + /* 35 */ null, + /* 36 */ null, // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 35 */ "\u044A", - /* 36~ */ - null, null, null, null, null, null, - /* ~41 */ + /* 37 */ "\u044A", + /* 38~ */ + null, null, null, null, null, null, null, + /* ~44 */ // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 42 */ "\u0410\u0411\u0412", - /* 43 */ "!text/single_9qm_lqm", - /* 44 */ "!text/double_9qm_lqm", - /* 45~ */ + /* 45 */ "\u0410\u0411\u0412", + /* 46 */ "!text/single_9qm_lqm", + /* 47 */ "!text/double_9qm_lqm", + /* 48~ */ null, null, null, - /* ~47 */ + /* ~50 */ // U+20B4: "₴" HRYVNIA SIGN - /* 48 */ "\u20B4", + /* 51 */ "\u20B4", }; /* Language vi: Vietnamese */ @@ -2969,10 +3074,10 @@ public final class KeyboardTextsSet { /* 10~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, - /* ~47 */ + null, null, null, null, null, null, null, null, null, null, null, + /* ~50 */ // U+20AB: "₫" DONG SIGN - /* 48 */ "\u20AB", + /* 51 */ "\u20AB", }; /* Language zu: Zulu */ @@ -3149,6 +3254,7 @@ public final class KeyboardTextsSet { "DEFAULT", LANGUAGE_DEFAULT, /* default */ "af", LANGUAGE_af, /* Afrikaans */ "ar", LANGUAGE_ar, /* Arabic */ + "az", LANGUAGE_az, /* Azerbaijani */ "be", LANGUAGE_be, /* Belarusian */ "bg", LANGUAGE_bg, /* Bulgarian */ "ca", LANGUAGE_ca, /* Catalan */ @@ -3170,6 +3276,7 @@ public final class KeyboardTextsSet { "it", LANGUAGE_it, /* Italian */ "iw", LANGUAGE_iw, /* Hebrew */ "ka", LANGUAGE_ka, /* Georgian */ + "kk", LANGUAGE_kk, /* Kazakh */ "ky", LANGUAGE_ky, /* Kirghiz */ "lt", LANGUAGE_lt, /* Lithuanian */ "lv", LANGUAGE_lv, /* Latvian */ diff --git a/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java b/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java new file mode 100644 index 000000000..ebbcedc96 --- /dev/null +++ b/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.latin; + +import android.content.Context; +import android.util.Log; + +import com.android.inputmethod.latin.makedict.UnsupportedFormatException; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +// TODO: Quit extending Dictionary after implementing dynamic binary dictionary. +abstract public class AbstractDictionaryWriter extends Dictionary { + /** Used for Log actions from this class */ + private static final String TAG = AbstractDictionaryWriter.class.getSimpleName(); + + private final Context mContext; + + public AbstractDictionaryWriter(final Context context, final String dictType) { + super(dictType); + mContext = context; + } + + abstract public void clear(); + + abstract public void addUnigramWord(final String word, final String shortcutTarget, + final int frequency, final boolean isNotAWord); + + abstract public void addBigramWords(final String word0, final String word1, + final int frequency, final boolean isValid); + + abstract public void removeBigramWords(final String word0, final String word1); + + abstract protected void writeBinaryDictionary(final FileOutputStream out) + throws IOException, UnsupportedFormatException; + + public void write(final String fileName) { + final String tempFileName = fileName + ".temp"; + final File file = new File(mContext.getFilesDir(), fileName); + final File tempFile = new File(mContext.getFilesDir(), tempFileName); + FileOutputStream out = null; + try { + out = new FileOutputStream(tempFile); + writeBinaryDictionary(out); + out.flush(); + out.close(); + tempFile.renameTo(file); + } catch (IOException e) { + Log.e(TAG, "IO exception while writing file", e); + } catch (UnsupportedFormatException e) { + Log.e(TAG, "Unsupported format", e); + } finally { + if (out != null) { + try { + out.close(); + } catch (IOException e) { + // ignore + } + } + } + } +} diff --git a/java/src/com/android/inputmethod/latin/Constants.java b/java/src/com/android/inputmethod/latin/Constants.java index bb4a42ede..ad09b6a56 100644 --- a/java/src/com/android/inputmethod/latin/Constants.java +++ b/java/src/com/android/inputmethod/latin/Constants.java @@ -149,6 +149,13 @@ public final class Constants { } /** + * Custom request code used in + * {@link com.android.inputmethod.keyboard.KeyboardActionListener#onCustomRequest(int)}. + */ + // The code to show input method picker. + public static final int CUSTOM_CODE_SHOW_INPUT_METHOD_PICKER = 1; + + /** * Some common keys code. Must be positive. */ public static final int CODE_ENTER = '\n'; diff --git a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java index 110be9db3..c99d0e2ea 100644 --- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java @@ -109,7 +109,6 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary { @Override public void loadDictionaryAsync() { - clearFusionDictionary(); loadDeviceAccountsEmailAddresses(); loadDictionaryAsyncForUri(ContactsContract.Profile.CONTENT_URI); // TODO: Switch this URL to the newer ContactsContract too @@ -236,6 +235,11 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary { } @Override + protected boolean needsToReloadBeforeWriting() { + return true; + } + + @Override protected boolean hasContentChanged() { final long startTime = SystemClock.uptimeMillis(); final int contactCount = getContactCount(); diff --git a/java/src/com/android/inputmethod/latin/DictionaryWriter.java b/java/src/com/android/inputmethod/latin/DictionaryWriter.java new file mode 100644 index 000000000..8be04c1c0 --- /dev/null +++ b/java/src/com/android/inputmethod/latin/DictionaryWriter.java @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.latin; + +import android.content.Context; + +import com.android.inputmethod.keyboard.ProximityInfo; +import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; +import com.android.inputmethod.latin.makedict.BinaryDictInputOutput; +import com.android.inputmethod.latin.makedict.FormatSpec; +import com.android.inputmethod.latin.makedict.FusionDictionary; +import com.android.inputmethod.latin.makedict.FusionDictionary.Node; +import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; +import com.android.inputmethod.latin.makedict.UnsupportedFormatException; +import com.android.inputmethod.latin.utils.CollectionUtils; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; + +/** + * An in memory dictionary for memorizing entries and writing a binary dictionary. + */ +public class DictionaryWriter extends AbstractDictionaryWriter { + // TODO: Regenerate version 3 binary dictionary. + private static final int BINARY_DICT_VERSION = 2; + private static final FormatSpec.FormatOptions FORMAT_OPTIONS = + new FormatSpec.FormatOptions(BINARY_DICT_VERSION); + + private FusionDictionary mFusionDictionary; + + public DictionaryWriter(final Context context, final String dictType) { + super(context, dictType); + clear(); + } + + @Override + public void clear() { + final HashMap<String, String> attributes = CollectionUtils.newHashMap(); + mFusionDictionary = new FusionDictionary(new Node(), + new FusionDictionary.DictionaryOptions(attributes, false, false)); + } + + /** + * Adds a word unigram to the fusion dictionary. + */ + // TODO: Create "cache dictionary" to cache fresh words for frequently updated dictionaries, + // considering performance regression. + @Override + public void addUnigramWord(final String word, final String shortcutTarget, final int frequency, + final boolean isNotAWord) { + if (shortcutTarget == null) { + mFusionDictionary.add(word, frequency, null, isNotAWord); + } else { + // TODO: Do this in the subclass, with this class taking an arraylist. + final ArrayList<WeightedString> shortcutTargets = CollectionUtils.newArrayList(); + shortcutTargets.add(new WeightedString(shortcutTarget, frequency)); + mFusionDictionary.add(word, frequency, shortcutTargets, isNotAWord); + } + } + + @Override + public void addBigramWords(final String word0, final String word1, final int frequency, + final boolean isValid) { + mFusionDictionary.setBigram(word0, word1, frequency); + } + + @Override + public void removeBigramWords(final String word0, final String word1) { + // This class don't support removing bigram words. + } + + @Override + protected void writeBinaryDictionary(final FileOutputStream out) + throws IOException, UnsupportedFormatException { + BinaryDictInputOutput.writeDictionaryBinary(out, mFusionDictionary, FORMAT_OPTIONS); + } + + @Override + public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer, + final String prevWord, final ProximityInfo proximityInfo, + boolean blockOffensiveWords) { + // This class doesn't support suggestion. + return null; + } + + @Override + public boolean isValidWord(String word) { + // This class doesn't support dictionary retrieval. + return false; + } +} diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java index a19363d54..a563c7686 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java @@ -22,20 +22,12 @@ import android.util.Log; import com.android.inputmethod.keyboard.ProximityInfo; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; -import com.android.inputmethod.latin.makedict.BinaryDictInputOutput; -import com.android.inputmethod.latin.makedict.FormatSpec; -import com.android.inputmethod.latin.makedict.FusionDictionary; -import com.android.inputmethod.latin.makedict.FusionDictionary.Node; -import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; -import com.android.inputmethod.latin.makedict.UnsupportedFormatException; import com.android.inputmethod.latin.utils.CollectionUtils; import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; -import java.util.concurrent.locks.ReentrantLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; /** * Abstract base class for an expandable dictionary that can be created and updated dynamically @@ -76,8 +68,8 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { */ private BinaryDictionary mBinaryDictionary; - /** The expandable fusion dictionary used to generate the binary dictionary. */ - private FusionDictionary mFusionDictionary; + /** The in-memory dictionary used to generate the binary dictionary. */ + private AbstractDictionaryWriter mDictionaryWriter; /** * The name of this dictionary, used as the filename for storing the binary dictionary. Multiple @@ -92,11 +84,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { /** Controls access to the local binary dictionary for this instance. */ private final DictionaryController mLocalDictionaryController = new DictionaryController(); - // TODO: Regenerate version 3 binary dictionary. - private static final int BINARY_DICT_VERSION = 2; - private static final FormatSpec.FormatOptions FORMAT_OPTIONS = - new FormatSpec.FormatOptions(BINARY_DICT_VERSION); - /** * Abstract method for loading the unigrams and bigrams of a given dictionary in a background * thread. @@ -138,7 +125,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { mContext = context; mBinaryDictionary = null; mSharedDictionaryController = getSharedDictionaryController(filename); - clearFusionDictionary(); + mDictionaryWriter = new DictionaryWriter(context, dictType); } protected static String getFilenameWithLocale(final String name, final String localeStr) { @@ -151,53 +138,57 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { @Override public void close() { // Ensure that no other threads are accessing the local binary dictionary. - mLocalDictionaryController.lock(); + mLocalDictionaryController.writeLock().lock(); try { if (mBinaryDictionary != null) { mBinaryDictionary.close(); mBinaryDictionary = null; } + mDictionaryWriter.close(); } finally { - mLocalDictionaryController.unlock(); + mLocalDictionaryController.writeLock().unlock(); } } /** - * Clears the fusion dictionary on the Java side. Note: Does not modify the binary dictionary on - * the native side. + * Adds a word unigram to the dictionary. Used for loading a dictionary. */ - public void clearFusionDictionary() { - final HashMap<String, String> attributes = CollectionUtils.newHashMap(); - mFusionDictionary = new FusionDictionary(new Node(), - new FusionDictionary.DictionaryOptions(attributes, false, false)); + protected void addWord(final String word, final String shortcutTarget, + final int frequency, final boolean isNotAWord) { + mDictionaryWriter.addUnigramWord(word, shortcutTarget, frequency, isNotAWord); } /** - * Adds a word unigram to the fusion dictionary. Call updateBinaryDictionary when all changes - * are done to update the binary dictionary. + * Sets a word bigram in the dictionary. Used for loading a dictionary. */ - // TODO: Create "cache dictionary" to cache fresh words for frequently updated dictionaries, - // considering performance regression. - protected void addWord(final String word, final String shortcutTarget, final int frequency, - final boolean isNotAWord) { - if (shortcutTarget == null) { - mFusionDictionary.add(word, frequency, null, isNotAWord); - } else { - // TODO: Do this in the subclass, with this class taking an arraylist. - final ArrayList<WeightedString> shortcutTargets = CollectionUtils.newArrayList(); - shortcutTargets.add(new WeightedString(shortcutTarget, frequency)); - mFusionDictionary.add(word, frequency, shortcutTargets, isNotAWord); + protected void setBigram(final String prevWord, final String word, final int frequency) { + mDictionaryWriter.addBigramWords(prevWord, word, frequency, true /* isValid */); + } + + /** + * Dynamically adds a word unigram to the dictionary. + */ + protected void addWordDynamically(final String word, final String shortcutTarget, + final int frequency, final boolean isNotAWord) { + mLocalDictionaryController.writeLock().lock(); + try { + mDictionaryWriter.addUnigramWord(word, shortcutTarget, frequency, isNotAWord); + } finally { + mLocalDictionaryController.writeLock().unlock(); } } /** - * Sets a word bigram in the fusion dictionary. Call updateBinaryDictionary when all changes are - * done to update the binary dictionary. + * Dynamically sets a word bigram in the dictionary. */ - // TODO: Create "cache dictionary" to cache fresh bigrams for frequently updated dictionaries, - // considering performance regression. - protected void setBigram(final String prevWord, final String word, final int frequency) { - mFusionDictionary.setBigram(prevWord, word, frequency); + protected void setBigramDynamically(final String prevWord, final String word, + final int frequency) { + mLocalDictionaryController.writeLock().lock(); + try { + mDictionaryWriter.addBigramWords(prevWord, word, frequency, true /* isValid */); + } finally { + mLocalDictionaryController.writeLock().unlock(); + } } @Override @@ -205,14 +196,28 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { final String prevWord, final ProximityInfo proximityInfo, final boolean blockOffensiveWords) { asyncReloadDictionaryIfRequired(); - if (mLocalDictionaryController.tryLock()) { + if (mLocalDictionaryController.readLock().tryLock()) { try { + final ArrayList<SuggestedWordInfo> inMemDictSuggestion = + mDictionaryWriter.getSuggestions(composer, prevWord, proximityInfo, + blockOffensiveWords); if (mBinaryDictionary != null) { - return mBinaryDictionary.getSuggestions(composer, prevWord, proximityInfo, - blockOffensiveWords); + final ArrayList<SuggestedWordInfo> binarySuggestion = + mBinaryDictionary.getSuggestions(composer, prevWord, proximityInfo, + blockOffensiveWords); + if (inMemDictSuggestion == null) { + return binarySuggestion; + } else if (binarySuggestion == null) { + return inMemDictSuggestion; + } else { + binarySuggestion.addAll(binarySuggestion); + return binarySuggestion; + } + } else { + return inMemDictSuggestion; } } finally { - mLocalDictionaryController.unlock(); + mLocalDictionaryController.readLock().unlock(); } } return null; @@ -225,11 +230,11 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { } protected boolean isValidWordInner(final String word) { - if (mLocalDictionaryController.tryLock()) { + if (mLocalDictionaryController.readLock().tryLock()) { try { return isValidWordLocked(word); } finally { - mLocalDictionaryController.unlock(); + mLocalDictionaryController.readLock().unlock(); } } return false; @@ -240,22 +245,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { return mBinaryDictionary.isValidWord(word); } - protected boolean isValidBigram(final String word1, final String word2) { - if (mBinaryDictionary == null) return false; - return mBinaryDictionary.isValidBigram(word1, word2); - } - - protected boolean isValidBigramInner(final String word1, final String word2) { - if (mLocalDictionaryController.tryLock()) { - try { - return isValidBigramLocked(word1, word2); - } finally { - mLocalDictionaryController.unlock(); - } - } - return false; - } - protected boolean isValidBigramLocked(final String word1, final String word2) { if (mBinaryDictionary == null) return false; return mBinaryDictionary.isValidBigram(word1, word2); @@ -274,7 +263,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { * Loads the current binary dictionary from internal storage. Assumes the dictionary file * exists. */ - protected void loadBinaryDictionary() { + private void loadBinaryDictionary() { if (DEBUG) { Log.d(TAG, "Loading binary dictionary: " + mFilename + " request=" + mSharedDictionaryController.mLastUpdateRequestTime + " update=" @@ -293,9 +282,12 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { // Ensure all threads accessing the current dictionary have finished before swapping in // the new one. final BinaryDictionary oldBinaryDictionary = mBinaryDictionary; - mLocalDictionaryController.lock(); - mBinaryDictionary = newBinaryDictionary; - mLocalDictionaryController.unlock(); + mLocalDictionaryController.writeLock().lock(); + try { + mBinaryDictionary = newBinaryDictionary; + } finally { + mLocalDictionaryController.writeLock().unlock(); + } oldBinaryDictionary.close(); } else { mBinaryDictionary = newBinaryDictionary; @@ -303,6 +295,12 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { } /** + * Abstract method for checking if it is required to reload the dictionary before writing + * a binary dictionary. + */ + abstract protected boolean needsToReloadBeforeWriting(); + + /** * Generates and writes a new binary dictionary based on the contents of the fusion dictionary. */ private void generateBinaryDictionary() { @@ -311,33 +309,11 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { + mSharedDictionaryController.mLastUpdateRequestTime + " update=" + mSharedDictionaryController.mLastUpdateTime); } - - loadDictionaryAsync(); - - final String tempFileName = mFilename + ".temp"; - final File file = new File(mContext.getFilesDir(), mFilename); - final File tempFile = new File(mContext.getFilesDir(), tempFileName); - FileOutputStream out = null; - try { - out = new FileOutputStream(tempFile); - BinaryDictInputOutput.writeDictionaryBinary(out, mFusionDictionary, FORMAT_OPTIONS); - out.flush(); - out.close(); - tempFile.renameTo(file); - clearFusionDictionary(); - } catch (IOException e) { - Log.e(TAG, "IO exception while writing file", e); - } catch (UnsupportedFormatException e) { - Log.e(TAG, "Unsupported format", e); - } finally { - if (out != null) { - try { - out.close(); - } catch (IOException e) { - // ignore - } - } + if (needsToReloadBeforeWriting()) { + mDictionaryWriter.clear(); + loadDictionaryAsync(); } + mDictionaryWriter.write(mFilename); } /** @@ -390,7 +366,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { private final void syncReloadDictionaryInternal() { // Ensure that only one thread attempts to read or write to the shared binary dictionary // file at the same time. - mSharedDictionaryController.lock(); + mSharedDictionaryController.writeLock().lock(); try { final long time = SystemClock.uptimeMillis(); final boolean dictionaryFileExists = dictionaryFileExists(); @@ -424,7 +400,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { } mLocalDictionaryController.mLastUpdateTime = time; } finally { - mSharedDictionaryController.unlock(); + mSharedDictionaryController.writeLock().unlock(); } } @@ -449,7 +425,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { * dictionary is out of date. Can be shared across multiple dictionary instances that access the * same filename. */ - private static class DictionaryController extends ReentrantLock { + private static class DictionaryController extends ReentrantReadWriteLock { private volatile long mLastUpdateTime = 0; private volatile long mLastUpdateRequestTime = 0; diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 243928f8b..f4f9dcc50 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1360,14 +1360,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen showSubtypeSelectorAndSettings(); } - // Virtual codes representing custom requests. These are used in onCustomRequest() below. - public static final int CODE_SHOW_INPUT_METHOD_PICKER = 1; - @Override public boolean onCustomRequest(final int requestCode) { if (isShowingOptionDialog()) return false; switch (requestCode) { - case CODE_SHOW_INPUT_METHOD_PICKER: + case Constants.CUSTOM_CODE_SHOW_INPUT_METHOD_PICKER: if (mRichImm.hasMultipleEnabledIMEsOrSubtypes(true /* include aux subtypes */)) { mRichImm.getInputMethodManager().showInputMethodPicker(); return true; @@ -2678,15 +2675,22 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } - // Callback called by PointerTracker through the KeyboardActionListener. This is called when a - // key is depressed; release matching call is onReleaseKey below. + // Callback of the {@link KeyboardActionListener}. This is called when a key is depressed; + // release matching call is {@link #onReleaseKey(int,boolean)} below. @Override public void onPressKey(final int primaryCode, final boolean isSinglePointer) { mKeyboardSwitcher.onPressKey(primaryCode, isSinglePointer); + final MainKeyboardView mKeyboardView = mKeyboardSwitcher.getMainKeyboardView(); + final boolean noFeedback = (mKeyboardView != null && mKeyboardView.isInSlidingKeyInput()) + || (primaryCode == Constants.CODE_DELETE && !mConnection.canDeleteCharacters()); + if (!noFeedback) { + AudioAndHapticFeedbackManager.getInstance().hapticAndAudioFeedback( + primaryCode, mKeyboardView); + } } - // Callback by PointerTracker through the KeyboardActionListener. This is called when a key - // is released; press matching call is onPressKey above. + // Callback of the {@link KeyboardActionListener}. This is called when a key is released; + // press matching call is {@link #onPressKey(int,boolean)} above. @Override public void onReleaseKey(final int primaryCode, final boolean withSliding) { mKeyboardSwitcher.onReleaseKey(primaryCode, withSliding); diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index 39170cf38..461de53ad 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -191,6 +191,10 @@ public final class RichInputConnection { return mIC.getSelectedText(flags); } + public boolean canDeleteCharacters() { + return mCurrentCursorPosition > 0; + } + /** * Gets the caps modes we should be in after this specific string. * diff --git a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java index ba84c1ad3..ab8f34893 100644 --- a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java @@ -240,7 +240,6 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary { private void addWords(final Cursor cursor) { final boolean hasShortcutColumn = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; - clearFusionDictionary(); if (cursor == null) return; if (cursor.moveToFirst()) { final int indexWord = cursor.getColumnIndex(Words.WORD); @@ -267,4 +266,9 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary { protected boolean hasContentChanged() { return true; } + + @Override + protected boolean needsToReloadBeforeWriting() { + return true; + } } |