diff options
Diffstat (limited to 'java/src')
65 files changed, 2997 insertions, 3088 deletions
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java index d0d5399c6..0043b7844 100644 --- a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java +++ b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java @@ -204,19 +204,6 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp } /** - * Intercepts touch events before dispatch when touch exploration is turned on in ICS and - * higher. - * - * @param event The motion event being dispatched. - * @return {@code true} if the event is handled - */ - public boolean dispatchTouchEvent(final MotionEvent event) { - // To avoid accidental key presses during touch exploration, always drop - // touch events generated by the user. - return false; - } - - /** * Receives hover events when touch exploration is turned on in SDK versions ICS and higher. * * @param event The hover event. diff --git a/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java b/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java index b119d6c82..4ea7fb888 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java +++ b/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java @@ -19,7 +19,10 @@ package com.android.inputmethod.compat; import android.os.Build; import android.view.inputmethod.InputMethodSubtype; +import com.android.inputmethod.latin.Constants; + import java.lang.reflect.Constructor; +import java.lang.reflect.Method; public final class InputMethodSubtypeCompatUtils { private static final String TAG = InputMethodSubtypeCompatUtils.class.getSimpleName(); @@ -37,6 +40,12 @@ public final class InputMethodSubtypeCompatUtils { } } } + + // Note that {@link InputMethodSubtype#isAsciiCapable()} has been introduced in API level 19 + // (Build.VERSION_CODE.KITKAT). + private static final Method METHOD_isAsciiCapable = CompatUtils.getMethod( + InputMethodSubtype.class, "isAsciiCapable"); + private InputMethodSubtypeCompatUtils() { // This utility class is not publicly instantiable. } @@ -53,4 +62,9 @@ public final class InputMethodSubtypeCompatUtils { nameId, iconId, locale, mode, extraValue, isAuxiliary, overridesImplicitlyEnabledSubtype, id); } + + public static boolean isAsciiCapable(final InputMethodSubtype subtype) { + return (Boolean)CompatUtils.invoke(subtype, false, METHOD_isAsciiCapable) + || subtype.containsExtraValueKey(Constants.Subtype.ExtraValue.ASCII_CAPABLE); + } } diff --git a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java index a32d76c30..60f7e2def 100644 --- a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java +++ b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java @@ -23,7 +23,6 @@ import android.text.Spanned; import android.text.TextUtils; import android.text.style.SuggestionSpan; -import com.android.inputmethod.latin.Dictionary; import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; @@ -70,7 +69,7 @@ public final class SuggestionSpanUtils { public static CharSequence getTextWithSuggestionSpan(final Context context, final String pickedWord, final SuggestedWords suggestedWords) { if (TextUtils.isEmpty(pickedWord) || suggestedWords.isEmpty() - || suggestedWords.mIsPrediction || suggestedWords.mIsPunctuationSuggestions) { + || suggestedWords.mIsPrediction || suggestedWords.isPunctuationSuggestions()) { return pickedWord; } diff --git a/java/src/com/android/inputmethod/dictionarypack/ActionBatch.java b/java/src/com/android/inputmethod/dictionarypack/ActionBatch.java index d5e638e7e..706bdea8e 100644 --- a/java/src/com/android/inputmethod/dictionarypack/ActionBatch.java +++ b/java/src/com/android/inputmethod/dictionarypack/ActionBatch.java @@ -117,16 +117,11 @@ public final class ActionBatch { final ContentValues values = MetadataDbHelper.getContentValuesByWordListId(db, mWordList.mId, mWordList.mVersion); final int status = values.getAsInteger(MetadataDbHelper.STATUS_COLUMN); - final DownloadManager manager = - (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); + final DownloadManagerWrapper manager = new DownloadManagerWrapper(context); if (MetadataDbHelper.STATUS_DOWNLOADING == status) { // The word list is still downloading. Cancel the download and revert the // word list status to "available". - if (null != manager) { - // DownloadManager is disabled (or not installed?). We can't cancel - there - // is nothing we can do. We still need to mark the entry as available. - manager.remove(values.getAsLong(MetadataDbHelper.PENDINGID_COLUMN)); - } + manager.remove(values.getAsLong(MetadataDbHelper.PENDINGID_COLUMN)); MetadataDbHelper.markEntryAsAvailable(db, mWordList.mId, mWordList.mVersion); } else if (MetadataDbHelper.STATUS_AVAILABLE != status) { // Should never happen @@ -136,9 +131,6 @@ public final class ActionBatch { // Download it. DebugLogUtils.l("Upgrade word list, downloading", mWordList.mRemoteFilename); - // TODO: if DownloadManager is disabled or not installed, download by ourselves - if (null == manager) return; - // This is an upgraded word list: we should download it. // Adding a disambiguator to circumvent a bug in older versions of DownloadManager. // DownloadManager also stupidly cuts the extension to replace with its own that it @@ -293,13 +285,8 @@ public final class ActionBatch { } // The word list is still downloading. Cancel the download and revert the // word list status to "available". - final DownloadManager manager = - (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); - if (null != manager) { - // If we can't cancel the download because DownloadManager is not available, - // we still need to mark the entry as available. - manager.remove(values.getAsLong(MetadataDbHelper.PENDINGID_COLUMN)); - } + final DownloadManagerWrapper manager = new DownloadManagerWrapper(context); + manager.remove(values.getAsLong(MetadataDbHelper.PENDINGID_COLUMN)); MetadataDbHelper.markEntryAsAvailable(db, mWordList.mId, mWordList.mVersion); } } diff --git a/java/src/com/android/inputmethod/dictionarypack/DictionaryDownloadProgressBar.java b/java/src/com/android/inputmethod/dictionarypack/DictionaryDownloadProgressBar.java index 384ee3e07..2623eff56 100644 --- a/java/src/com/android/inputmethod/dictionarypack/DictionaryDownloadProgressBar.java +++ b/java/src/com/android/inputmethod/dictionarypack/DictionaryDownloadProgressBar.java @@ -107,26 +107,22 @@ public class DictionaryDownloadProgressBar extends ProgressBar { private class UpdaterThread extends Thread { private final static int REPORT_PERIOD = 150; // how often to report progress, in ms - final DownloadManager mDownloadManager; + final DownloadManagerWrapper mDownloadManagerWrapper; final int mId; public UpdaterThread(final Context context, final int id) { super(); - mDownloadManager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); + mDownloadManagerWrapper = new DownloadManagerWrapper(context); mId = id; } @Override public void run() { try { - // It's almost impossible that mDownloadManager is null (it would mean it has been - // disabled between pressing the 'install' button and displaying the progress - // bar), but just in case. - if (null == mDownloadManager) return; final UpdateHelper updateHelper = new UpdateHelper(); final Query query = new Query().setFilterById(mId); int lastProgress = 0; setIndeterminate(true); while (!isInterrupted()) { - final Cursor cursor = mDownloadManager.query(query); + final Cursor cursor = mDownloadManagerWrapper.query(query); if (null == cursor) { // Can't contact DownloadManager: this should never happen. return; diff --git a/java/src/com/android/inputmethod/dictionarypack/DictionarySettingsFragment.java b/java/src/com/android/inputmethod/dictionarypack/DictionarySettingsFragment.java index 7bbd041e7..d18639741 100644 --- a/java/src/com/android/inputmethod/dictionarypack/DictionarySettingsFragment.java +++ b/java/src/com/android/inputmethod/dictionarypack/DictionarySettingsFragment.java @@ -317,15 +317,19 @@ public final class DictionarySettingsFragment extends PreferenceFragment final WordListPreference pref; if (null != oldPreference && oldPreference.mVersion == version + && oldPreference.hasStatus(status) && oldPreference.mLocale.equals(locale)) { - // If the old preference has all the new attributes, reuse it. We test - // for version and locale because although attributes other than status - // need to be the same, others have been tested through the key of the - // map. Also, status may differ so we don't want to use #equals() here. + // If the old preference has all the new attributes, reuse it. Ideally, we + // should reuse the old pref even if its status is different and call + // setStatus here, but setStatus calls Preference#setSummary() which needs + // to be done on the UI thread and we're not on the UI thread here. We + // could do all this work on the UI thread, but in this case it's probably + // lighter to stay on a background thread and throw this old preference out. pref = oldPreference; - pref.setStatus(status); } else { // Otherwise, discard it and create a new one instead. + // TODO: when the status is different from the old one, we need to + // animate the old one out before animating the new one in. pref = new WordListPreference(activity, mDictionaryListInterfaceState, mClientId, wordlistId, version, locale, description, status, filesize); diff --git a/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java b/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java new file mode 100644 index 000000000..e95ca1799 --- /dev/null +++ b/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2014 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.dictionarypack; + +import android.app.DownloadManager; +import android.app.DownloadManager.Query; +import android.app.DownloadManager.Request; +import android.content.Context; +import android.database.Cursor; +import android.database.sqlite.SQLiteException; +import android.os.ParcelFileDescriptor; +import android.util.Log; + +import java.io.FileNotFoundException; + +/** + * A class to help with calling DownloadManager methods. + * + * Mostly, the problem here is that most methods from DownloadManager may throw SQL exceptions if + * they can't open the database on disk. We want to avoid crashing in these cases but can't do + * much more, so this class insulates the callers from these. SQLiteException also inherit from + * RuntimeException so they are unchecked :( + * While we're at it, we also insulate callers from the cases where DownloadManager is disabled, + * and getSystemService returns null. + */ +public class DownloadManagerWrapper { + private final static String TAG = DownloadManagerWrapper.class.getSimpleName(); + private final DownloadManager mDownloadManager; + + public DownloadManagerWrapper(final Context context) { + this((DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE)); + } + + private DownloadManagerWrapper(final DownloadManager downloadManager) { + mDownloadManager = downloadManager; + } + + public void remove(final long... ids) { + try { + if (null != mDownloadManager) { + mDownloadManager.remove(ids); + } + } catch (SQLiteException e) { + // We couldn't remove the file from DownloadManager. Apparently, the database can't + // be opened. It may be a problem with file system corruption. In any case, there is + // not much we can do apart from avoiding crashing. + Log.e(TAG, "Can't remove files with ID " + ids + " from download manager", e); + } + } + + public ParcelFileDescriptor openDownloadedFile(final long fileId) throws FileNotFoundException { + try { + if (null != mDownloadManager) { + return mDownloadManager.openDownloadedFile(fileId); + } + } catch (SQLiteException e) { + Log.e(TAG, "Can't open downloaded file with ID " + fileId, e); + } + // We come here if mDownloadManager is null or if an exception was thrown. + throw new FileNotFoundException(); + } + + public Cursor query(final Query query) { + try { + if (null != mDownloadManager) { + return mDownloadManager.query(query); + } + } catch (SQLiteException e) { + Log.e(TAG, "Can't query the download manager", e); + } + // We come here if mDownloadManager is null or if an exception was thrown. + return null; + } + + public long enqueue(final Request request) { + try { + if (null != mDownloadManager) { + return mDownloadManager.enqueue(request); + } + } catch (SQLiteException e) { + Log.e(TAG, "Can't enqueue a request with the download manager", e); + } + return 0; + } +} diff --git a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java index 0e7c3bb7e..dcff490db 100644 --- a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java +++ b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java @@ -249,13 +249,7 @@ public final class UpdateHandler { metadataRequest.setVisibleInDownloadsUi( res.getBoolean(R.bool.metadata_downloads_visible_in_download_UI)); - final DownloadManager manager = - (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); - if (null == manager) { - // Download manager is not installed or disabled. - // TODO: fall back to self-managed download? - return; - } + final DownloadManagerWrapper manager = new DownloadManagerWrapper(context); cancelUpdateWithDownloadManager(context, metadataUri, manager); final long downloadId; synchronized (sSharedIdProtector) { @@ -278,10 +272,10 @@ public final class UpdateHandler { * * @param context the context to open the database on * @param metadataUri the URI to cancel - * @param manager an instance of DownloadManager + * @param manager an wrapped instance of DownloadManager */ private static void cancelUpdateWithDownloadManager(final Context context, - final String metadataUri, final DownloadManager manager) { + final String metadataUri, final DownloadManagerWrapper manager) { synchronized (sSharedIdProtector) { final long metadataDownloadId = MetadataDbHelper.getMetadataDownloadIdForURI(context, metadataUri); @@ -306,10 +300,9 @@ public final class UpdateHandler { * @param clientId the ID of the client we want to cancel the update of */ public static void cancelUpdate(final Context context, final String clientId) { - final DownloadManager manager = - (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); + final DownloadManagerWrapper manager = new DownloadManagerWrapper(context); final String metadataUri = MetadataDbHelper.getMetadataUriAsString(context, clientId); - if (null != manager) cancelUpdateWithDownloadManager(context, metadataUri, manager); + cancelUpdateWithDownloadManager(context, metadataUri, manager); } /** @@ -323,15 +316,15 @@ public final class UpdateHandler { * download request id, which is not known before submitting the request to the download * manager. Hence, it only updates the relevant line. * - * @param manager the download manager service to register the request with. + * @param manager a wrapped download manager service to register the request with. * @param request the request to register. * @param db the metadata database. * @param id the id of the word list. * @param version the version of the word list. * @return the download id returned by the download manager. */ - public static long registerDownloadRequest(final DownloadManager manager, final Request request, - final SQLiteDatabase db, final String id, final int version) { + public static long registerDownloadRequest(final DownloadManagerWrapper manager, + final Request request, final SQLiteDatabase db, final String id, final int version) { DebugLogUtils.l("RegisterDownloadRequest for word list id : ", id, ", version ", version); final long downloadId; synchronized (sSharedIdProtector) { @@ -345,8 +338,8 @@ public final class UpdateHandler { /** * Retrieve information about a specific download from DownloadManager. */ - private static CompletedDownloadInfo getCompletedDownloadInfo(final DownloadManager manager, - final long downloadId) { + private static CompletedDownloadInfo getCompletedDownloadInfo( + final DownloadManagerWrapper manager, final long downloadId) { final Query query = new Query().setFilterById(downloadId); final Cursor cursor = manager.query(query); @@ -425,8 +418,7 @@ public final class UpdateHandler { DebugLogUtils.l("DownloadFinished with id", fileId); if (NOT_AN_ID == fileId) return; // Spurious wake-up: ignore - final DownloadManager manager = - (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); + final DownloadManagerWrapper manager = new DownloadManagerWrapper(context); final CompletedDownloadInfo downloadInfo = getCompletedDownloadInfo(manager, fileId); final ArrayList<DownloadRecord> recordList = @@ -517,7 +509,7 @@ public final class UpdateHandler { } private static boolean handleDownloadedFile(final Context context, - final DownloadRecord downloadRecord, final DownloadManager manager, + final DownloadRecord downloadRecord, final DownloadManagerWrapper manager, final long fileId) { try { // {@link handleWordList(Context,InputStream,ContentValues)}. diff --git a/java/src/com/android/inputmethod/dictionarypack/WordListPreference.java b/java/src/com/android/inputmethod/dictionarypack/WordListPreference.java index ba1fce1a8..aea16af0d 100644 --- a/java/src/com/android/inputmethod/dictionarypack/WordListPreference.java +++ b/java/src/com/android/inputmethod/dictionarypack/WordListPreference.java @@ -98,6 +98,10 @@ public final class WordListPreference extends Preference { setSummary(getSummary(status)); } + public boolean hasStatus(final int status) { + return status == mStatus; + } + @Override public View onCreateView(final ViewGroup parent) { final View orphanedView = mInterfaceState.findFirstOrphanedView(); @@ -217,6 +221,7 @@ public final class WordListPreference extends Preference { progressBar.setIds(mClientId, mWordlistId); progressBar.setMax(mFilesize); final boolean showProgressBar = (MetadataDbHelper.STATUS_DOWNLOADING == mStatus); + setSummary(getSummary(mStatus)); status.setVisibility(showProgressBar ? View.INVISIBLE : View.VISIBLE); progressBar.setVisibility(showProgressBar ? View.VISIBLE : View.INVISIBLE); diff --git a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java index c34464314..4c53b528f 100644 --- a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java +++ b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java @@ -25,6 +25,7 @@ import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Color; import android.graphics.Rect; +import android.graphics.Typeface; import android.os.Build; import android.os.CountDownTimer; import android.preference.PreferenceManager; @@ -34,6 +35,7 @@ import android.util.AttributeSet; import android.util.Log; import android.util.Pair; import android.util.SparseArray; +import android.util.TypedValue; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; @@ -84,6 +86,8 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange private EmojiPalettesAdapter mEmojiPalettesAdapter; private final EmojiLayoutParams mEmojiLayoutParams; + private TextView mAlphabetKeyLeft; + private TextView mAlphabetKeyRight; private TabHost mTabHost; private ViewPager mEmojiPager; private int mCurrentPagerPosition = 0; @@ -487,20 +491,23 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange deleteKey.setTag(Constants.CODE_DELETE); deleteKey.setOnTouchListener(mDeleteKeyOnTouchListener); - // alphabetKey, alphabetKey2, and spaceKey depend on {@link View.OnClickListener} as well as - // {@link View.OnTouchListener}. {@link View.OnTouchListener} is used as the trigger of - // key-press, while {@link View.OnClickListener} is used as the trigger of key-release which - // does not occur if the event is canceled by moving off the finger from the view. - final ImageView alphabetKey = (ImageView)findViewById(R.id.emoji_keyboard_alphabet); - alphabetKey.setBackgroundResource(mEmojiFunctionalKeyBackgroundId); - alphabetKey.setTag(Constants.CODE_ALPHA_FROM_EMOJI); - alphabetKey.setOnTouchListener(this); - alphabetKey.setOnClickListener(this); - final ImageView alphabetKey2 = (ImageView)findViewById(R.id.emoji_keyboard_alphabet2); - alphabetKey2.setBackgroundResource(mEmojiFunctionalKeyBackgroundId); - alphabetKey2.setTag(Constants.CODE_ALPHA_FROM_EMOJI); - alphabetKey2.setOnTouchListener(this); - alphabetKey2.setOnClickListener(this); + // {@link #mAlphabetKeyLeft}, {@link #mAlphabetKeyRight, and spaceKey depend on + // {@link View.OnClickListener} as well as {@link View.OnTouchListener}. + // {@link View.OnTouchListener} is used as the trigger of key-press, while + // {@link View.OnClickListener} is used as the trigger of key-release which does not occur + // if the event is canceled by moving off the finger from the view. + // The text on alphabet keys are set at + // {@link #startEmojiPalettes(String,int,float,Typeface)}. + mAlphabetKeyLeft = (TextView)findViewById(R.id.emoji_keyboard_alphabet_left); + mAlphabetKeyLeft.setBackgroundResource(mEmojiFunctionalKeyBackgroundId); + mAlphabetKeyLeft.setTag(Constants.CODE_ALPHA_FROM_EMOJI); + mAlphabetKeyLeft.setOnTouchListener(this); + mAlphabetKeyLeft.setOnClickListener(this); + mAlphabetKeyRight = (TextView)findViewById(R.id.emoji_keyboard_alphabet_right); + mAlphabetKeyRight.setBackgroundResource(mEmojiFunctionalKeyBackgroundId); + mAlphabetKeyRight.setTag(Constants.CODE_ALPHA_FROM_EMOJI); + mAlphabetKeyRight.setOnTouchListener(this); + mAlphabetKeyRight.setOnClickListener(this); final ImageView spaceKey = (ImageView)findViewById(R.id.emoji_keyboard_space); spaceKey.setBackgroundResource(mKeyBackgroundId); spaceKey.setTag(Constants.CODE_SPACE); @@ -627,10 +634,20 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange // TODO: } - public void startEmojiPalettes() { + // Hack: These parameters are hacky. + public void startEmojiPalettes(final String switchToAlphaLabel, final int switchToAlphaColor, + final float switchToAlphaSize, final Typeface switchToAlphaTypeface) { if (DEBUG_PAGER) { Log.d(TAG, "allocate emoji palettes memory " + mCurrentPagerPosition); } + mAlphabetKeyLeft.setText(switchToAlphaLabel); + mAlphabetKeyLeft.setTextColor(switchToAlphaColor); + mAlphabetKeyLeft.setTextSize(TypedValue.COMPLEX_UNIT_PX, switchToAlphaSize); + mAlphabetKeyLeft.setTypeface(switchToAlphaTypeface); + mAlphabetKeyRight.setText(switchToAlphaLabel); + mAlphabetKeyRight.setTextColor(switchToAlphaColor); + mAlphabetKeyRight.setTextSize(TypedValue.COMPLEX_UNIT_PX, switchToAlphaSize); + mAlphabetKeyRight.setTypeface(switchToAlphaTypeface); mEmojiPager.setAdapter(mEmojiPalettesAdapter); mEmojiPager.setCurrentItem(mCurrentPagerPosition); } diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index 6f0f75314..ceda9ee9a 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -292,8 +292,7 @@ public class Key implements Comparable<Key> { actionFlags |= ACTION_FLAGS_ENABLE_LONG_PRESS; mMoreKeys = new MoreKeySpec[moreKeys.length]; for (int i = 0; i < moreKeys.length; i++) { - mMoreKeys[i] = new MoreKeySpec( - moreKeys[i], needsToUpperCase, locale, params.mCodesSet); + mMoreKeys[i] = new MoreKeySpec(moreKeys[i], needsToUpperCase, locale); } } else { mMoreKeys = null; @@ -306,7 +305,7 @@ public class Key implements Comparable<Key> { final int previewIconId = KeySpecParser.getIconId(style.getString(keyAttr, R.styleable.Keyboard_Key_keyIconPreview)); - final int code = KeySpecParser.getCode(keySpec, params.mCodesSet); + final int code = KeySpecParser.getCode(keySpec); if ((mLabelFlags & LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL) != 0) { mLabel = params.mId.mCustomActionLabel; } else if (code >= Character.MIN_SUPPLEMENTARY_CODE_POINT) { @@ -353,8 +352,8 @@ public class Key implements Comparable<Key> { } else { mCode = StringUtils.toUpperCaseOfCodeForLocale(code, needsToUpperCase, locale); } - final int altCodeInAttr = KeySpecParser.parseCode(style.getString(keyAttr, - R.styleable.Keyboard_Key_altCode), params.mCodesSet, CODE_UNSPECIFIED); + final int altCodeInAttr = KeySpecParser.parseCode( + style.getString(keyAttr, R.styleable.Keyboard_Key_altCode), CODE_UNSPECIFIED); final int altCode = StringUtils.toUpperCaseOfCodeForLocale( altCodeInAttr, needsToUpperCase, locale); mOptionalAttributes = OptionalAttributes.newInstance(outputText, altCode, diff --git a/java/src/com/android/inputmethod/keyboard/KeyDetector.java b/java/src/com/android/inputmethod/keyboard/KeyDetector.java index 149f10fd7..282c8e8fa 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyDetector.java +++ b/java/src/com/android/inputmethod/keyboard/KeyDetector.java @@ -18,7 +18,9 @@ package com.android.inputmethod.keyboard; import com.android.inputmethod.latin.Constants; - +/** + * This class handles key detection. + */ public class KeyDetector { private final int mKeyHysteresisDistanceSquared; private final int mKeyHysteresisDistanceForSlidingModifierSquared; @@ -27,18 +29,12 @@ public class KeyDetector { private int mCorrectionX; private int mCorrectionY; - /** - * This class handles key detection. - * - * @param keyHysteresisDistance if the pointer movement distance is smaller than this, the - * movement will not be handled as meaningful movement. The unit is pixel. - */ - public KeyDetector(float keyHysteresisDistance) { - this(keyHysteresisDistance, keyHysteresisDistance); + public KeyDetector() { + this(0.0f /* keyHysteresisDistance */, 0.0f /* keyHysteresisDistanceForSlidingModifier */); } /** - * This class handles key detection. + * Key detection object constructor with key hysteresis distances. * * @param keyHysteresisDistance if the pointer movement distance is smaller than this, the * movement will not be handled as meaningful movement. The unit is pixel. diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java index e5b814faf..cde5091c4 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java @@ -20,7 +20,6 @@ import static com.android.inputmethod.latin.Constants.ImeOption.FORCE_ASCII; import static com.android.inputmethod.latin.Constants.ImeOption.NO_MICROPHONE; import static com.android.inputmethod.latin.Constants.ImeOption.NO_MICROPHONE_COMPAT; import static com.android.inputmethod.latin.Constants.ImeOption.NO_SETTINGS_KEY; -import static com.android.inputmethod.latin.Constants.Subtype.ExtraValue.ASCII_CAPABLE; import android.content.Context; import android.content.res.Resources; @@ -34,6 +33,7 @@ import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodSubtype; import com.android.inputmethod.compat.EditorInfoCompatUtils; +import com.android.inputmethod.compat.InputMethodSubtypeCompatUtils; import com.android.inputmethod.keyboard.internal.KeyboardBuilder; import com.android.inputmethod.keyboard.internal.KeyboardParams; import com.android.inputmethod.keyboard.internal.KeysCache; @@ -248,7 +248,7 @@ public final class KeyboardLayoutSet { } public Builder setSubtype(final InputMethodSubtype subtype) { - final boolean asciiCapable = subtype.containsExtraValueKey(ASCII_CAPABLE); + final boolean asciiCapable = InputMethodSubtypeCompatUtils.isAsciiCapable(subtype); @SuppressWarnings("deprecation") final boolean deprecatedForceAscii = InputAttributes.inPrivateImeOptions( mPackageName, FORCE_ASCII, mParams.mEditorInfo); diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index aebba60fb..6215e2710 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -19,6 +19,7 @@ package com.android.inputmethod.keyboard; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Resources; +import android.graphics.Paint; import android.preference.PreferenceManager; import android.util.Log; import android.view.ContextThemeWrapper; @@ -30,6 +31,7 @@ import com.android.inputmethod.accessibility.AccessibleKeyboardViewProxy; import com.android.inputmethod.compat.InputMethodServiceCompatUtils; import com.android.inputmethod.keyboard.KeyboardLayoutSet.KeyboardLayoutSetException; import com.android.inputmethod.keyboard.internal.KeyboardState; +import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.InputView; import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.LatinImeLogger; @@ -74,13 +76,13 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { private MainKeyboardView mKeyboardView; private EmojiPalettesView mEmojiPalettesView; private LatinIME mLatinIME; - private Resources mResources; private boolean mIsHardwareAcceleratedDrawingEnabled; private KeyboardState mState; private KeyboardLayoutSet mKeyboardLayoutSet; private SettingsValues mCurrentSettingsValues; + private Key mSwitchToAlphaKey; /** mIsAutoCorrectionActive indicates that auto corrected word will be input instead of * what user actually typed. */ @@ -106,7 +108,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { private void initInternal(final LatinIME latinIme, final SharedPreferences prefs) { mLatinIME = latinIme; - mResources = latinIme.getResources(); mPrefs = prefs; mSubtypeSwitcher = SubtypeSwitcher.getInstance(); mState = new KeyboardState(this); @@ -162,6 +163,8 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { mCurrentSettingsValues = settingsValues; try { mState.onLoadKeyboard(); + final Keyboard symbols = mKeyboardLayoutSet.getKeyboard(KeyboardId.ELEMENT_SYMBOLS); + mSwitchToAlphaKey = symbols.getKey(Constants.CODE_SWITCH_ALPHA_SYMBOL); } catch (KeyboardLayoutSetException e) { Log.w(TAG, "loading keyboard failed: " + e.mKeyboardId, e.getCause()); LatinImeLogger.logOnException(e.mKeyboardId.toString(), e.getCause()); @@ -287,7 +290,10 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { @Override public void setEmojiKeyboard() { mMainKeyboardFrame.setVisibility(View.GONE); - mEmojiPalettesView.startEmojiPalettes(); + final Paint paint = mKeyboardView.newLabelPaint(mSwitchToAlphaKey); + mEmojiPalettesView.startEmojiPalettes( + mSwitchToAlphaKey.getLabel(), paint.getColor(), paint.getTextSize(), + paint.getTypeface()); mEmojiPalettesView.setVisibility(View.VISIBLE); } diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index 422bd12a3..dd3ab9cce 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -582,6 +582,7 @@ public class KeyboardView extends View { paint.setTypeface(mKeyDrawParams.mTypeface); paint.setTextSize(mKeyDrawParams.mLabelSize); } else { + paint.setColor(key.selectTextColor(mKeyDrawParams)); paint.setTypeface(key.selectTypeface(mKeyDrawParams)); paint.setTextSize(key.selectTextSize(mKeyDrawParams)); } diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index bd955ae6a..6c56b8aab 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -726,14 +726,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack } @Override - public boolean dispatchTouchEvent(MotionEvent event) { - if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) { - return AccessibleKeyboardViewProxy.getInstance().dispatchTouchEvent(event); - } - return super.dispatchTouchEvent(event); - } - - @Override public boolean onTouchEvent(final MotionEvent me) { if (getKeyboard() == null) { return false; diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java b/java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java index 81b8f0428..4a80279ca 100644 --- a/java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java +++ b/java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java @@ -21,7 +21,7 @@ public final class MoreKeysDetector extends KeyDetector { private final int mSlideAllowanceSquareTop; public MoreKeysDetector(float slideAllowance) { - super(/* keyHysteresisDistance */0); + super(); mSlideAllowanceSquare = (int)(slideAllowance * slideAllowance); // Top slide allowance is slightly longer (sqrt(2) times) than other edges. mSlideAllowanceSquareTop = mSlideAllowanceSquare * 2; diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index b5d82fa33..befc4e6fa 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -155,7 +155,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element, // The {@link KeyDetector} is set whenever the down event is processed. Also this is updated // when new {@link Keyboard} is set by {@link #setKeyDetector(KeyDetector)}. - private KeyDetector mKeyDetector; + private KeyDetector mKeyDetector = new KeyDetector(); private Keyboard mKeyboard; private int mPhantomSuddenMoveThreshold; private final BogusMoveEventDetector mBogusMoveEventDetector = new BogusMoveEventDetector(); @@ -1124,9 +1124,6 @@ public final class PointerTracker implements PointerTrackerQueue.Element, private boolean isMajorEnoughMoveToBeOnNewKey(final int x, final int y, final long eventTime, final Key newKey) { - if (mKeyDetector == null) { - throw new NullPointerException("keyboard and/or key detector not set"); - } final Key curKey = mCurrentKey; if (newKey == curKey) { return false; diff --git a/java/src/com/android/inputmethod/keyboard/internal/EmojiPageKeyboardView.java b/java/src/com/android/inputmethod/keyboard/internal/EmojiPageKeyboardView.java index be7396520..e175a051e 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/EmojiPageKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/internal/EmojiPageKeyboardView.java @@ -52,7 +52,7 @@ public final class EmojiPageKeyboardView extends KeyboardView implements }; private OnKeyEventListener mListener = EMPTY_LISTENER; - private final KeyDetector mKeyDetector = new KeyDetector(0.0f /*keyHysteresisDistance */); + private final KeyDetector mKeyDetector = new KeyDetector(); private final GestureDetector mGestureDetector; public EmojiPageKeyboardView(final Context context, final AttributeSet attrs) { diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java b/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java index 209966606..48ba8e051 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java @@ -184,7 +184,7 @@ public final class KeySpecParser { return (StringUtils.codePointCount(label) == 1) ? null : label; } - public static int getCode(final String keySpec, final KeyboardCodesSet codesSet) { + public static int getCode(final String keySpec) { if (keySpec == null) { // TODO: Throw {@link KeySpecParserError} once Key.keyLabel attribute becomes mandatory. return CODE_UNSPECIFIED; @@ -192,7 +192,7 @@ public final class KeySpecParser { final int labelEnd = indexOfLabelEnd(keySpec); if (hasCode(keySpec, labelEnd)) { checkDoubleLabelEnd(keySpec, labelEnd); - return parseCode(getAfterLabelEnd(keySpec, labelEnd), codesSet, CODE_UNSPECIFIED); + return parseCode(getAfterLabelEnd(keySpec, labelEnd), CODE_UNSPECIFIED); } final String outputText = getOutputTextInternal(keySpec, labelEnd); if (outputText != null) { @@ -211,13 +211,12 @@ public final class KeySpecParser { return (StringUtils.codePointCount(label) == 1) ? label.codePointAt(0) : CODE_OUTPUT_TEXT; } - public static int parseCode(final String text, final KeyboardCodesSet codesSet, - final int defaultCode) { + public static int parseCode(final String text, final int defaultCode) { if (text == null) { return defaultCode; } if (text.startsWith(KeyboardCodesSet.PREFIX_CODE)) { - return codesSet.getCode(text.substring(KeyboardCodesSet.PREFIX_CODE.length())); + return KeyboardCodesSet.getCode(text.substring(KeyboardCodesSet.PREFIX_CODE.length())); } // This is a workaround to have a key that has a supplementary code point. We can't put a // string in resource as a XML entity of a supplementary code point or a surrogate pair. diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java index 340d184b6..81a8e7196 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java @@ -279,7 +279,6 @@ public class KeyboardBuilder<KP extends KeyboardParams> { params.mThemeId = keyboardAttr.getInt(R.styleable.Keyboard_themeId, 0); params.mIconsSet.loadIcons(keyboardAttr); final Locale locale = params.mId.mLocale; - params.mCodesSet.setLocale(locale); params.mTextsSet.setLocale(locale); final RunInLocale<Void> job = new RunInLocale<Void>() { @Override diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java index 9f873ed9c..06da5719b 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java @@ -18,26 +18,22 @@ package com.android.inputmethod.keyboard.internal; import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.utils.CollectionUtils; -import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; import java.util.HashMap; -import java.util.Locale; public final class KeyboardCodesSet { public static final String PREFIX_CODE = "!code/"; private static final HashMap<String, Integer> sNameToIdMap = CollectionUtils.newHashMap(); - private int[] mCodes = DEFAULT; - - public void setLocale(final Locale locale) { - mCodes = SubtypeLocaleUtils.isRtlLanguage(locale) ? RTL : DEFAULT; + private KeyboardCodesSet() { + // This utility class is not publicly instantiable. } - public int getCode(final String name) { + public static int getCode(final String name) { Integer id = sNameToIdMap.get(name); if (id == null) throw new RuntimeException("Unknown key code: " + name); - return mCodes[id]; + return DEFAULT[id]; } private static final String[] ID_TO_NAME = { @@ -58,26 +54,8 @@ public final class KeyboardCodesSet { "key_emoji", "key_alpha_from_emoji", "key_unspecified", - "key_left_parenthesis", - "key_right_parenthesis", - "key_less_than", - "key_greater_than", - "key_left_square_bracket", - "key_right_square_bracket", - "key_left_curly_bracket", - "key_right_curly_bracket", }; - private static final int CODE_LEFT_PARENTHESIS = '('; - private static final int CODE_RIGHT_PARENTHESIS = ')'; - private static final int CODE_LESS_THAN_SIGN = '<'; - private static final int CODE_GREATER_THAN_SIGN = '>'; - private static final int CODE_LEFT_SQUARE_BRACKET = '['; - private static final int CODE_RIGHT_SQUARE_BRACKET = ']'; - private static final int CODE_LEFT_CURLY_BRACKET = '{'; - private static final int CODE_RIGHT_CURLY_BRACKET = '}'; - - // This array should be aligned with the array RTL below. private static final int[] DEFAULT = { Constants.CODE_TAB, Constants.CODE_ENTER, @@ -96,48 +74,9 @@ public final class KeyboardCodesSet { Constants.CODE_EMOJI, Constants.CODE_ALPHA_FROM_EMOJI, Constants.CODE_UNSPECIFIED, - CODE_LEFT_PARENTHESIS, - CODE_RIGHT_PARENTHESIS, - CODE_LESS_THAN_SIGN, - CODE_GREATER_THAN_SIGN, - CODE_LEFT_SQUARE_BRACKET, - CODE_RIGHT_SQUARE_BRACKET, - CODE_LEFT_CURLY_BRACKET, - CODE_RIGHT_CURLY_BRACKET, - }; - - private static final int[] RTL = { - DEFAULT[0], - DEFAULT[1], - DEFAULT[2], - DEFAULT[3], - DEFAULT[4], - DEFAULT[5], - DEFAULT[6], - DEFAULT[7], - DEFAULT[8], - DEFAULT[9], - DEFAULT[10], - DEFAULT[11], - DEFAULT[12], - DEFAULT[13], - DEFAULT[14], - DEFAULT[15], - DEFAULT[16], - CODE_RIGHT_PARENTHESIS, - CODE_LEFT_PARENTHESIS, - CODE_GREATER_THAN_SIGN, - CODE_LESS_THAN_SIGN, - CODE_RIGHT_SQUARE_BRACKET, - CODE_LEFT_SQUARE_BRACKET, - CODE_RIGHT_CURLY_BRACKET, - CODE_LEFT_CURLY_BRACKET, }; static { - if (DEFAULT.length != RTL.length || DEFAULT.length != ID_TO_NAME.length) { - throw new RuntimeException("Internal inconsistency"); - } for (int i = 0; i < ID_TO_NAME.length; i++) { sNameToIdMap.put(ID_TO_NAME[i], i); } diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java index d32bb7581..153391eed 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java @@ -62,7 +62,6 @@ public class KeyboardParams { public final ArrayList<Key> mShiftKeys = CollectionUtils.newArrayList(); public final ArrayList<Key> mAltCodeKeysWhileTyping = CollectionUtils.newArrayList(); public final KeyboardIconsSet mIconsSet = new KeyboardIconsSet(); - public final KeyboardCodesSet mCodesSet = new KeyboardCodesSet(); public final KeyboardTextsSet mTextsSet = new KeyboardTextsSet(); public final KeyStylesSet mKeyStyles = new KeyStylesSet(mTextsSet); diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java index 27e3e3006..89221ba24 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java @@ -85,13 +85,13 @@ public final class KeyboardTextsSet { do { level++; if (level >= MAX_STRING_REFERENCE_INDIRECTION) { - throw new RuntimeException("too many @string/resource indirection: " + text); + throw new RuntimeException("Too many " + PREFIX_TEXT + "name indirection: " + text); } final int prefixLen = PREFIX_TEXT.length(); final int size = text.length(); if (size < prefixLen) { - return TextUtils.isEmpty(text) ? null : text; + break; } sb = null; diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java index a9eeeb0ab..93d80c909 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java @@ -43,337 +43,390 @@ import java.util.HashMap; public final class KeyboardTextsTable { // Name to index map. private static final HashMap<String, Integer> sNameToIndexesMap = CollectionUtils.newHashMap(); - // Language to texts map. - private static final HashMap<String, String[]> sLanguageToTextsMap = + // Language to texts table map. + private static final HashMap<String, String[]> sLanguageToTextsTableMap = + CollectionUtils.newHashMap(); + // TODO: Remove this variable after debugging. + // Texts table to language maps. + private static final HashMap<String[], String> sTextsTableToLanguageMap = CollectionUtils.newHashMap(); public static String getText(final String name, final String[] textsTable) { final Integer indexObj = sNameToIndexesMap.get(name); if (indexObj == null) { - throw new RuntimeException("Unknown text name: " + name); + throw new RuntimeException("Unknown text name=" + name + " language=" + + sTextsTableToLanguageMap.get(textsTable)); } final int index = indexObj; final String text = (index < textsTable.length) ? textsTable[index] : null; - return (text != null) ? text : LANGUAGE_DEFAULT[index]; + if (text != null) { + return text; + } + // Sanity check. + if (index >= 0 && index < LANGUAGE_DEFAULT.length) { + return LANGUAGE_DEFAULT[index]; + } + // Throw exception for debugging purpose. + throw new RuntimeException("Illegal index=" + index + " for name=" + name + + " language=" + sTextsTableToLanguageMap.get(textsTable)); } public static String[] getTextsTable(final String language) { - final String[] textsTable = sLanguageToTextsMap.get(language); + final String[] textsTable = sLanguageToTextsTableMap.get(language); return textsTable != null ? textsTable : LANGUAGE_DEFAULT; } private static final String[] NAMES = { - /* 0 */ "more_keys_for_a", - /* 1 */ "more_keys_for_e", - /* 2 */ "more_keys_for_i", - /* 3 */ "more_keys_for_o", - /* 4 */ "more_keys_for_u", - /* 5 */ "more_keys_for_s", - /* 6 */ "more_keys_for_n", - /* 7 */ "more_keys_for_c", - /* 8 */ "more_keys_for_y", - /* 9 */ "more_keys_for_d", - /* 10 */ "more_keys_for_r", - /* 11 */ "more_keys_for_t", - /* 12 */ "more_keys_for_z", - /* 13 */ "more_keys_for_k", - /* 14 */ "more_keys_for_l", - /* 15 */ "more_keys_for_g", - /* 16 */ "more_keys_for_v", - /* 17 */ "more_keys_for_h", - /* 18 */ "more_keys_for_j", - /* 19 */ "more_keys_for_w", - /* 20 */ "keylabel_for_nordic_row1_11", - /* 21 */ "keylabel_for_nordic_row2_10", - /* 22 */ "keylabel_for_nordic_row2_11", - /* 23 */ "more_keys_for_nordic_row2_10", - /* 24 */ "more_keys_for_nordic_row2_11", - /* 25 */ "keylabel_for_east_slavic_row1_9", - /* 26 */ "keylabel_for_east_slavic_row1_12", - /* 27 */ "keylabel_for_east_slavic_row2_1", - /* 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_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 */ "keylabel_for_swiss_row1_11", - /* 46 */ "keylabel_for_swiss_row2_10", - /* 47 */ "keylabel_for_swiss_row2_11", - /* 48 */ "more_keys_for_swiss_row1_11", - /* 49 */ "more_keys_for_swiss_row2_10", - /* 50 */ "more_keys_for_swiss_row2_11", - /* 51 */ "label_to_alpha_key", - /* 52 */ "single_quotes", - /* 53 */ "double_quotes", - /* 54 */ "single_angle_quotes", - /* 55 */ "double_angle_quotes", - /* 56 */ "more_keys_for_currency_dollar", - /* 57 */ "keylabel_for_currency", - /* 58 */ "more_keys_for_currency", - /* 59 */ "more_keys_for_punctuation", - /* 60 */ "more_keys_for_tablet_punctuation", - /* 61 */ "keylabel_for_spanish_row2_10", - /* 62 */ "more_keys_for_star", - /* 63 */ "more_keys_for_bullet", - /* 64 */ "more_keys_for_plus", - /* 65 */ "more_keys_for_left_parenthesis", - /* 66 */ "more_keys_for_right_parenthesis", - /* 67 */ "more_keys_for_less_than", - /* 68 */ "more_keys_for_greater_than", - /* 69 */ "more_keys_for_arabic_diacritics", - /* 70 */ "keylabel_for_symbols_1", - /* 71 */ "keylabel_for_symbols_2", - /* 72 */ "keylabel_for_symbols_3", - /* 73 */ "keylabel_for_symbols_4", - /* 74 */ "keylabel_for_symbols_5", - /* 75 */ "keylabel_for_symbols_6", - /* 76 */ "keylabel_for_symbols_7", - /* 77 */ "keylabel_for_symbols_8", - /* 78 */ "keylabel_for_symbols_9", - /* 79 */ "keylabel_for_symbols_0", - /* 80 */ "label_to_symbol_key", - /* 81 */ "label_to_symbol_with_microphone_key", - /* 82 */ "additional_more_keys_for_symbols_1", - /* 83 */ "additional_more_keys_for_symbols_2", - /* 84 */ "additional_more_keys_for_symbols_3", - /* 85 */ "additional_more_keys_for_symbols_4", - /* 86 */ "additional_more_keys_for_symbols_5", - /* 87 */ "additional_more_keys_for_symbols_6", - /* 88 */ "additional_more_keys_for_symbols_7", - /* 89 */ "additional_more_keys_for_symbols_8", - /* 90 */ "additional_more_keys_for_symbols_9", - /* 91 */ "additional_more_keys_for_symbols_0", - /* 92 */ "more_keys_for_symbols_1", - /* 93 */ "more_keys_for_symbols_2", - /* 94 */ "more_keys_for_symbols_3", - /* 95 */ "more_keys_for_symbols_4", - /* 96 */ "more_keys_for_symbols_5", - /* 97 */ "more_keys_for_symbols_6", - /* 98 */ "more_keys_for_symbols_7", - /* 99 */ "more_keys_for_symbols_8", - /* 100 */ "more_keys_for_symbols_9", - /* 101 */ "more_keys_for_symbols_0", - /* 102 */ "keylabel_for_comma", - /* 103 */ "more_keys_for_comma", - /* 104 */ "keylabel_for_tablet_comma", - /* 105 */ "keyhintlabel_for_tablet_comma", - /* 106 */ "more_keys_for_tablet_comma", - /* 107 */ "keylabel_for_period", - /* 108 */ "keyhintlabel_for_period", - /* 109 */ "more_keys_for_period", - /* 110 */ "keylabel_for_tablet_period", - /* 111 */ "keyhintlabel_for_tablet_period", - /* 112 */ "more_keys_for_tablet_period", - /* 113 */ "keylabel_for_symbols_question", - /* 114 */ "keylabel_for_symbols_semicolon", - /* 115 */ "keylabel_for_symbols_percent", - /* 116 */ "more_keys_for_exclamation", - /* 117 */ "more_keys_for_question", - /* 118 */ "more_keys_for_symbols_semicolon", - /* 119 */ "more_keys_for_symbols_percent", - /* 120 */ "more_keys_for_q", - /* 121 */ "more_keys_for_x", - /* 122 */ "keylabel_for_q", - /* 123 */ "keylabel_for_w", - /* 124 */ "keylabel_for_y", - /* 125 */ "keylabel_for_x", - /* 126 */ "more_keys_for_am_pm", - /* 127 */ "settings_as_more_key", - /* 128 */ "shortcut_as_more_key", - /* 129 */ "action_next_as_more_key", - /* 130 */ "action_previous_as_more_key", - /* 131 */ "label_to_more_symbol_key", - /* 132 */ "label_to_more_symbol_for_tablet_key", - /* 133 */ "label_tab_key", - /* 134 */ "label_to_phone_numeric_key", - /* 135 */ "label_to_phone_symbols_key", - /* 136 */ "label_time_am", - /* 137 */ "label_time_pm", - /* 138 */ "keylabel_for_popular_domain", - /* 139 */ "more_keys_for_popular_domain", - /* 140 */ "single_laqm_raqm", - /* 141 */ "single_laqm_raqm_rtl", - /* 142 */ "single_raqm_laqm", - /* 143 */ "double_laqm_raqm", - /* 144 */ "double_laqm_raqm_rtl", - /* 145 */ "double_raqm_laqm", - /* 146 */ "single_lqm_rqm", - /* 147 */ "single_9qm_lqm", - /* 148 */ "single_9qm_rqm", - /* 149 */ "double_lqm_rqm", - /* 150 */ "double_9qm_lqm", - /* 151 */ "double_9qm_rqm", - /* 152 */ "more_keys_for_single_quote", - /* 153 */ "more_keys_for_double_quote", - /* 154 */ "more_keys_for_tablet_double_quote", - /* 155 */ "emoji_key_as_more_key", + // /* index:histogram */ "name", + /* 0:30 */ "more_keys_for_a", + /* 1:30 */ "more_keys_for_o", + /* 2:28 */ "more_keys_for_u", + /* 3:27 */ "more_keys_for_e", + /* 4:26 */ "more_keys_for_i", + /* 5:23 */ "double_quotes", + /* 6:22 */ "single_quotes", + /* 7:21 */ "more_keys_for_c", + /* 8:20 */ "more_keys_for_s", + /* 9:20 */ "more_keys_for_n", + /* 10:20 */ "label_to_alpha_key", + /* 11:15 */ "more_keys_for_y", + /* 12:13 */ "more_keys_for_d", + /* 13:12 */ "more_keys_for_z", + /* 14:10 */ "more_keys_for_t", + /* 15:10 */ "more_keys_for_l", + /* 16: 9 */ "more_keys_for_g", + /* 17: 9 */ "single_angle_quotes", + /* 18: 9 */ "double_angle_quotes", + /* 19: 9 */ "keylabel_for_currency", + /* 20: 8 */ "more_keys_for_r", + /* 21: 6 */ "more_keys_for_k", + /* 22: 6 */ "keylabel_for_nordic_row1_11", + /* 23: 6 */ "keylabel_for_nordic_row2_10", + /* 24: 6 */ "keylabel_for_nordic_row2_11", + /* 25: 6 */ "more_keys_for_cyrillic_ie", + /* 26: 5 */ "more_keys_for_nordic_row2_10", + /* 27: 5 */ "keylabel_for_east_slavic_row1_9", + /* 28: 5 */ "keylabel_for_east_slavic_row1_12", + /* 29: 5 */ "keylabel_for_east_slavic_row2_1", + /* 30: 5 */ "keylabel_for_east_slavic_row2_11", + /* 31: 5 */ "keylabel_for_east_slavic_row3_5", + /* 32: 5 */ "more_keys_for_cyrillic_soft_sign", + /* 33: 5 */ "more_keys_for_punctuation", + /* 34: 4 */ "more_keys_for_nordic_row2_11", + /* 35: 4 */ "keylabel_for_symbols_1", + /* 36: 4 */ "keylabel_for_symbols_2", + /* 37: 4 */ "keylabel_for_symbols_3", + /* 38: 4 */ "keylabel_for_symbols_4", + /* 39: 4 */ "keylabel_for_symbols_5", + /* 40: 4 */ "keylabel_for_symbols_6", + /* 41: 4 */ "keylabel_for_symbols_7", + /* 42: 4 */ "keylabel_for_symbols_8", + /* 43: 4 */ "keylabel_for_symbols_9", + /* 44: 4 */ "keylabel_for_symbols_0", + /* 45: 4 */ "label_to_symbol_key", + /* 46: 4 */ "label_to_symbol_with_microphone_key", + /* 47: 4 */ "additional_more_keys_for_symbols_1", + /* 48: 4 */ "additional_more_keys_for_symbols_2", + /* 49: 4 */ "additional_more_keys_for_symbols_3", + /* 50: 4 */ "additional_more_keys_for_symbols_4", + /* 51: 4 */ "additional_more_keys_for_symbols_5", + /* 52: 4 */ "additional_more_keys_for_symbols_6", + /* 53: 4 */ "additional_more_keys_for_symbols_7", + /* 54: 4 */ "additional_more_keys_for_symbols_8", + /* 55: 4 */ "additional_more_keys_for_symbols_9", + /* 56: 4 */ "additional_more_keys_for_symbols_0", + /* 57: 3 */ "more_keys_for_star", + /* 58: 3 */ "keyspec_left_parenthesis", + /* 59: 3 */ "keyspec_right_parenthesis", + /* 60: 3 */ "keyspec_left_square_bracket", + /* 61: 3 */ "keyspec_right_square_bracket", + /* 62: 3 */ "keyspec_left_curly_bracket", + /* 63: 3 */ "keyspec_right_curly_bracket", + /* 64: 3 */ "keyspec_less_than", + /* 65: 3 */ "keyspec_greater_than", + /* 66: 3 */ "keyspec_less_than_equal", + /* 67: 3 */ "keyspec_greater_than_equal", + /* 68: 3 */ "keyspec_left_double_angle_quote", + /* 69: 3 */ "keyspec_right_double_angle_quote", + /* 70: 3 */ "keyspec_left_single_angle_quote", + /* 71: 3 */ "keyspec_right_single_angle_quote", + /* 72: 3 */ "keylabel_for_tablet_comma", + /* 73: 3 */ "more_keys_for_tablet_period", + /* 74: 3 */ "more_keys_for_question", + /* 75: 2 */ "more_keys_for_h", + /* 76: 2 */ "more_keys_for_w", + /* 77: 2 */ "more_keys_for_cyrillic_u", + /* 78: 2 */ "more_keys_for_cyrillic_en", + /* 79: 2 */ "more_keys_for_cyrillic_ghe", + /* 80: 2 */ "more_keys_for_east_slavic_row2_1", + /* 81: 2 */ "more_keys_for_cyrillic_o", + /* 82: 2 */ "keylabel_for_south_slavic_row1_6", + /* 83: 2 */ "keylabel_for_south_slavic_row2_11", + /* 84: 2 */ "keylabel_for_south_slavic_row3_1", + /* 85: 2 */ "keylabel_for_south_slavic_row3_8", + /* 86: 2 */ "more_keys_for_cyrillic_i", + /* 87: 2 */ "keylabel_for_swiss_row1_11", + /* 88: 2 */ "keylabel_for_swiss_row2_10", + /* 89: 2 */ "keylabel_for_swiss_row2_11", + /* 90: 2 */ "more_keys_for_swiss_row1_11", + /* 91: 2 */ "more_keys_for_swiss_row2_10", + /* 92: 2 */ "more_keys_for_swiss_row2_11", + /* 93: 2 */ "keylabel_for_spanish_row2_10", + /* 94: 2 */ "more_keys_for_bullet", + /* 95: 2 */ "more_keys_for_left_parenthesis", + /* 96: 2 */ "more_keys_for_right_parenthesis", + /* 97: 2 */ "more_keys_for_arabic_diacritics", + /* 98: 2 */ "keylabel_for_comma", + /* 99: 2 */ "more_keys_for_comma", + /* 100: 2 */ "keyhintlabel_for_tablet_comma", + /* 101: 2 */ "more_keys_for_tablet_comma", + /* 102: 2 */ "keyhintlabel_for_period", + /* 103: 2 */ "more_keys_for_period", + /* 104: 2 */ "keyhintlabel_for_tablet_period", + /* 105: 2 */ "keylabel_for_symbols_question", + /* 106: 2 */ "keylabel_for_symbols_semicolon", + /* 107: 2 */ "keylabel_for_symbols_percent", + /* 108: 2 */ "more_keys_for_symbols_semicolon", + /* 109: 2 */ "more_keys_for_symbols_percent", + /* 110: 1 */ "more_keys_for_v", + /* 111: 1 */ "more_keys_for_j", + /* 112: 1 */ "more_keys_for_cyrillic_ka", + /* 113: 1 */ "more_keys_for_cyrillic_a", + /* 114: 1 */ "more_keys_for_east_slavic_row2_11", + /* 115: 1 */ "more_keys_for_currency_dollar", + /* 116: 1 */ "more_keys_for_tablet_punctuation", + /* 117: 1 */ "more_keys_for_plus", + /* 118: 1 */ "more_keys_for_less_than", + /* 119: 1 */ "more_keys_for_greater_than", + /* 120: 1 */ "keylabel_for_period", + /* 121: 1 */ "keylabel_for_tablet_period", + /* 122: 1 */ "more_keys_for_exclamation", + /* 123: 1 */ "more_keys_for_q", + /* 124: 1 */ "more_keys_for_x", + /* 125: 1 */ "keylabel_for_q", + /* 126: 1 */ "keylabel_for_w", + /* 127: 1 */ "keylabel_for_y", + /* 128: 1 */ "keylabel_for_x", + /* 129: 0 */ "more_keys_for_currency", + /* 130: 0 */ "more_keys_for_symbols_1", + /* 131: 0 */ "more_keys_for_symbols_2", + /* 132: 0 */ "more_keys_for_symbols_3", + /* 133: 0 */ "more_keys_for_symbols_4", + /* 134: 0 */ "more_keys_for_symbols_5", + /* 135: 0 */ "more_keys_for_symbols_6", + /* 136: 0 */ "more_keys_for_symbols_7", + /* 137: 0 */ "more_keys_for_symbols_8", + /* 138: 0 */ "more_keys_for_symbols_9", + /* 139: 0 */ "more_keys_for_symbols_0", + /* 140: 0 */ "more_keys_for_am_pm", + /* 141: 0 */ "settings_as_more_key", + /* 142: 0 */ "shortcut_as_more_key", + /* 143: 0 */ "action_next_as_more_key", + /* 144: 0 */ "action_previous_as_more_key", + /* 145: 0 */ "label_to_more_symbol_key", + /* 146: 0 */ "label_to_more_symbol_for_tablet_key", + /* 147: 0 */ "label_to_phone_numeric_key", + /* 148: 0 */ "label_to_phone_symbols_key", + /* 149: 0 */ "label_time_am", + /* 150: 0 */ "label_time_pm", + /* 151: 0 */ "keylabel_for_popular_domain", + /* 152: 0 */ "more_keys_for_popular_domain", + /* 153: 0 */ "keyspecs_for_left_parenthesis_more_keys", + /* 154: 0 */ "keyspecs_for_right_parenthesis_more_keys", + /* 155: 0 */ "single_laqm_raqm", + /* 156: 0 */ "single_raqm_laqm", + /* 157: 0 */ "double_laqm_raqm", + /* 158: 0 */ "double_raqm_laqm", + /* 159: 0 */ "single_lqm_rqm", + /* 160: 0 */ "single_9qm_lqm", + /* 161: 0 */ "single_9qm_rqm", + /* 162: 0 */ "single_rqm_9qm", + /* 163: 0 */ "double_lqm_rqm", + /* 164: 0 */ "double_9qm_lqm", + /* 165: 0 */ "double_9qm_rqm", + /* 166: 0 */ "double_rqm_9qm", + /* 167: 0 */ "more_keys_for_single_quote", + /* 168: 0 */ "more_keys_for_double_quote", + /* 169: 0 */ "more_keys_for_tablet_double_quote", + /* 170: 0 */ "emoji_key_as_more_key", }; private static final String EMPTY = ""; /* Default texts */ private static final String[] LANGUAGE_DEFAULT = { - /* 0~ */ - 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, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, - /* ~50 */ + /* more_keys_for_a ~ */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_lqm_rqm", + /* single_quotes */ "!text/single_lqm_rqm", + /* more_keys_for_c ~ */ + EMPTY, EMPTY, EMPTY, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. - /* 51 */ "ABC", - /* 52 */ "!text/single_lqm_rqm", - /* 53 */ "!text/double_lqm_rqm", - /* 54 */ "!text/single_laqm_raqm", - /* 55 */ "!text/double_laqm_raqm", - // U+00A2: "¢" CENT SIGN - // U+00A3: "£" POUND SIGN - // U+20AC: "€" EURO SIGN - // U+00A5: "¥" YEN SIGN - // U+20B1: "₱" PESO SIGN - /* 56 */ "\u00A2,\u00A3,\u20AC,\u00A5,\u20B1", - /* 57 */ "$", - /* 58 */ "$,\u00A2,\u20AC,\u00A3,\u00A5,\u20B1", - /* 59 */ "!fixedColumnOrder!8,;,/,(,),#,!,\\,,?,&,\\%,+,\",-,:,',@", - /* 60 */ "!fixedColumnOrder!7,;,/,(,),#,',\\,,&,\\%,+,\",-,:,@", - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - /* 61 */ "\u00F1", + /* label_to_alpha_key */ "ABC", + /* more_keys_for_y ~ */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ more_keys_for_g */ + /* single_angle_quotes */ "!text/single_laqm_raqm", + /* double_angle_quotes */ "!text/double_laqm_raqm", + /* keylabel_for_currency */ "$", + /* more_keys_for_r ~ */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ more_keys_for_cyrillic_soft_sign */ + /* more_keys_for_punctuation */ "!fixedColumnOrder!8,;,/,!text/keyspec_left_parenthesis,!text/keyspec_right_parenthesis,#,!,\\,,?,&,\\%,+,\",-,:,',@", + /* more_keys_for_nordic_row2_11 */ EMPTY, + /* keylabel_for_symbols_1 */ "1", + /* keylabel_for_symbols_2 */ "2", + /* keylabel_for_symbols_3 */ "3", + /* keylabel_for_symbols_4 */ "4", + /* keylabel_for_symbols_5 */ "5", + /* keylabel_for_symbols_6 */ "6", + /* keylabel_for_symbols_7 */ "7", + /* keylabel_for_symbols_8 */ "8", + /* keylabel_for_symbols_9 */ "9", + /* keylabel_for_symbols_0 */ "0", + // Label for "switch to symbols" key. + /* label_to_symbol_key */ "?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. + /* label_to_symbol_with_microphone_key */ "123", + /* additional_more_keys_for_symbols_1 ~ */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ additional_more_keys_for_symbols_0 */ // U+2020: "†" DAGGER // U+2021: "‡" DOUBLE DAGGER // U+2605: "★" BLACK STAR - /* 62 */ "\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 - /* 63 */ "\u266A,\u2665,\u2660,\u2666,\u2663", - // U+00B1: "±" PLUS-MINUS SIGN - /* 64 */ "\u00B1", + /* more_keys_for_star */ "\u2020,\u2021,\u2605", // The all letters need to be mirrored are found at // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt - /* 65 */ "!fixedColumnOrder!3,<,{,[", - /* 66 */ "!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 - /* 67 */ "!fixedColumnOrder!3,\u2039,\u2264,\u00AB", - /* 68 */ "!fixedColumnOrder!3,\u203A,\u2265,\u00BB", - /* 69 */ EMPTY, - /* 70 */ "1", - /* 71 */ "2", - /* 72 */ "3", - /* 73 */ "4", - /* 74 */ "5", - /* 75 */ "6", - /* 76 */ "7", - /* 77 */ "8", - /* 78 */ "9", - /* 79 */ "0", - // Label for "switch to symbols" key. - /* 80 */ "?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. - /* 81 */ "123", - /* 82~ */ - EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, - /* ~91 */ + /* keyspec_left_parenthesis */ "(", + /* keyspec_right_parenthesis */ ")", + /* keyspec_left_square_bracket */ "[", + /* keyspec_right_square_bracket */ "]", + /* keyspec_left_curly_bracket */ "{", + /* keyspec_right_curly_bracket */ "}", + /* keyspec_less_than */ "<", + /* keyspec_greater_than */ ">", + /* keyspec_less_than_equal */ "\u2264", + /* keyspec_greater_than_equal */ "\u2265", + /* keyspec_left_double_angle_quote */ "\u00AB", + /* keyspec_right_double_angle_quote */ "\u00BB", + /* keyspec_left_single_angle_quote */ "\u2039", + /* keyspec_right_single_angle_quote */ "\u203A", + /* keylabel_for_tablet_comma */ ",", + /* more_keys_for_tablet_period */ "!text/more_keys_for_tablet_punctuation", + // U+00BF: "¿" INVERTED QUESTION MARK + /* more_keys_for_question */ "\u00BF", + /* more_keys_for_h ~ */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ more_keys_for_swiss_row2_11 */ + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + /* keylabel_for_spanish_row2_10 */ "\u00F1", + // U+266A: "♪" EIGHTH NOTE + // U+2665: "♥" BLACK HEART SUIT + // U+2660: "♠" BLACK SPADE SUIT + // U+2666: "♦" BLACK DIAMOND SUIT + // U+2663: "♣" BLACK CLUB SUIT + /* more_keys_for_bullet */ "\u266A,\u2665,\u2660,\u2666,\u2663", + /* more_keys_for_left_parenthesis */ "!fixedColumnOrder!3,!text/keyspecs_for_left_parenthesis_more_keys", + /* more_keys_for_right_parenthesis */ "!fixedColumnOrder!3,!text/keyspecs_for_right_parenthesis_more_keys", + /* more_keys_for_arabic_diacritics */ EMPTY, + // Comma key + /* keylabel_for_comma */ ",", + /* more_keys_for_comma ~ */ + EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ keyhintlabel_for_period */ + /* more_keys_for_period */ "!text/more_keys_for_punctuation", + /* keyhintlabel_for_tablet_period */ EMPTY, + /* keylabel_for_symbols_question */ "?", + /* keylabel_for_symbols_semicolon */ ";", + /* keylabel_for_symbols_percent */ "%", + /* more_keys_for_symbols_semicolon */ EMPTY, + // U+2030: "‰" PER MILLE SIGN + /* more_keys_for_symbols_percent */ "\u2030", + /* more_keys_for_v ~ */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ more_keys_for_east_slavic_row2_11 */ + // U+00A2: "¢" CENT SIGN + // U+00A3: "£" POUND SIGN + // U+20AC: "€" EURO SIGN + // U+00A5: "¥" YEN SIGN + // U+20B1: "₱" PESO SIGN + /* more_keys_for_currency_dollar */ "\u00A2,\u00A3,\u20AC,\u00A5,\u20B1", + /* more_keys_for_tablet_punctuation */ "!fixedColumnOrder!7,;,/,!text/keyspec_left_parenthesis,!text/keyspec_right_parenthesis,#,',\\,,&,\\%,+,\",-,:,@", + // U+00B1: "±" PLUS-MINUS SIGN + /* more_keys_for_plus */ "\u00B1", + /* more_keys_for_less_than */ "!fixedColumnOrder!3,!text/keyspec_left_single_angle_quote,!text/keyspec_less_than_equal,!text/keyspec_left_double_angle_quote", + /* more_keys_for_greater_than */ "!fixedColumnOrder!3,!text/keyspec_right_single_angle_quote,!text/keyspec_greater_than_equal,!text/keyspec_right_double_angle_quote", + // Period key + /* keylabel_for_period */ ".", + /* keylabel_for_tablet_period */ ".", + // U+00A1: "¡" INVERTED EXCLAMATION MARK + /* more_keys_for_exclamation */ "\u00A1", + /* more_keys_for_q */ EMPTY, + /* more_keys_for_x */ EMPTY, + /* keylabel_for_q */ "q", + /* keylabel_for_w */ "w", + /* keylabel_for_y */ "y", + /* keylabel_for_x */ "x", + /* more_keys_for_currency */ "$,\u00A2,\u20AC,\u00A3,\u00A5,\u20B1", // 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 - /* 92 */ "\u00B9,\u00BD,\u2153,\u00BC,\u215B", + /* more_keys_for_symbols_1 */ "\u00B9,\u00BD,\u2153,\u00BC,\u215B", // U+00B2: "²" SUPERSCRIPT TWO // U+2154: "⅔" VULGAR FRACTION TWO THIRDS - /* 93 */ "\u00B2,\u2154", + /* more_keys_for_symbols_2 */ "\u00B2,\u2154", // U+00B3: "³" SUPERSCRIPT THREE // U+00BE: "¾" VULGAR FRACTION THREE QUARTERS // U+215C: "⅜" VULGAR FRACTION THREE EIGHTHS - /* 94 */ "\u00B3,\u00BE,\u215C", + /* more_keys_for_symbols_3 */ "\u00B3,\u00BE,\u215C", // U+2074: "⁴" SUPERSCRIPT FOUR - /* 95 */ "\u2074", + /* more_keys_for_symbols_4 */ "\u2074", // U+215D: "⅝" VULGAR FRACTION FIVE EIGHTHS - /* 96 */ "\u215D", - /* 97 */ EMPTY, + /* more_keys_for_symbols_5 */ "\u215D", + /* more_keys_for_symbols_6 */ EMPTY, // U+215E: "⅞" VULGAR FRACTION SEVEN EIGHTHS - /* 98 */ "\u215E", - /* 99 */ EMPTY, - /* 100 */ EMPTY, + /* more_keys_for_symbols_7 */ "\u215E", + /* more_keys_for_symbols_8 */ EMPTY, + /* more_keys_for_symbols_9 */ EMPTY, // U+207F: "ⁿ" SUPERSCRIPT LATIN SMALL LETTER N // U+2205: "∅" EMPTY SET - /* 101 */ "\u207F,\u2205", - // Comma key - /* 102 */ ",", - /* 103 */ EMPTY, - /* 104 */ ",", - /* 105 */ EMPTY, - /* 106 */ EMPTY, - // Period key - /* 107 */ ".", - /* 108 */ EMPTY, - /* 109 */ "!text/more_keys_for_punctuation", - /* 110 */ ".", - /* 111 */ EMPTY, - /* 112 */ "!text/more_keys_for_tablet_punctuation", - /* 113 */ "?", - /* 114 */ ";", - /* 115 */ "%", - // U+00A1: "¡" INVERTED EXCLAMATION MARK - /* 116 */ "\u00A1", - // U+00BF: "¿" INVERTED QUESTION MARK - /* 117 */ "\u00BF", - /* 118 */ EMPTY, - // U+2030: "‰" PER MILLE SIGN - /* 119 */ "\u2030", - /* 120 */ EMPTY, - /* 121 */ EMPTY, - /* 122 */ "q", - /* 123 */ "w", - /* 124 */ "y", - /* 125 */ "x", - /* 126 */ "!fixedColumnOrder!2,!hasLabels!,!text/label_time_am,!text/label_time_pm", - /* 127 */ "!icon/settings_key|!code/key_settings", - /* 128 */ "!icon/shortcut_key|!code/key_shortcut", - /* 129 */ "!hasLabels!,!text/label_next_key|!code/key_action_next", - /* 130 */ "!hasLabels!,!text/label_previous_key|!code/key_action_previous", + /* more_keys_for_symbols_0 */ "\u207F,\u2205", + /* more_keys_for_am_pm */ "!fixedColumnOrder!2,!hasLabels!,!text/label_time_am,!text/label_time_pm", + /* settings_as_more_key */ "!icon/settings_key|!code/key_settings", + /* shortcut_as_more_key */ "!icon/shortcut_key|!code/key_shortcut", + /* action_next_as_more_key */ "!hasLabels!,!text/label_next_key|!code/key_action_next", + /* action_previous_as_more_key */ "!hasLabels!,!text/label_previous_key|!code/key_action_previous", // Label for "switch to more symbol" modifier key ("= \ <"). Must be short to fit on key! - /* 131 */ "= \\\\ <", + /* label_to_more_symbol_key */ "= \\\\ <", // Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key! - /* 132 */ "~ [ <", - // Label for "Tab" key. Must be short to fit on key! - /* 133 */ "Tab", + /* label_to_more_symbol_for_tablet_key */ "~ [ <", // Label for "switch to phone numeric" key. Must be short to fit on key! - /* 134 */ "123", + /* label_to_phone_numeric_key */ "123", // Label for "switch to phone symbols" key. Must be short to fit on key! // U+FF0A: "*" FULLWIDTH ASTERISK // U+FF03: "#" FULLWIDTH NUMBER SIGN - /* 135 */ "\uFF0A\uFF03", + /* label_to_phone_symbols_key */ "\uFF0A\uFF03", // Key label for "ante meridiem" - /* 136 */ "AM", + /* label_time_am */ "AM", // Key label for "post meridiem" - /* 137 */ "PM", - /* 138 */ ".com", + /* label_time_pm */ "PM", + /* keylabel_for_popular_domain */ ".com", // popular web domains for the locale - most popular, displayed on the keyboard - /* 139 */ "!hasLabels!,.net,.org,.gov,.edu", - // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK - // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + /* more_keys_for_popular_domain */ "!hasLabels!,.net,.org,.gov,.edu", + /* keyspecs_for_left_parenthesis_more_keys */ "!text/keyspec_less_than,!text/keyspec_left_curly_bracket,!text/keyspec_left_square_bracket", + /* keyspecs_for_right_parenthesis_more_keys */ "!text/keyspec_greater_than,!text/keyspec_right_curly_bracket,!text/keyspec_right_square_bracket", // The following characters don't need BIDI mirroring. // U+2018: "‘" LEFT SINGLE QUOTATION MARK // U+2019: "’" RIGHT SINGLE QUOTATION MARK @@ -384,32 +437,31 @@ public final class KeyboardTextsTable { // Abbreviations are: // laqm: LEFT-POINTING ANGLE QUOTATION MARK // raqm: RIGHT-POINTING ANGLE QUOTATION MARK - // rtl: Right-To-Left script order // lqm: LEFT QUOTATION MARK // rqm: RIGHT QUOTATION MARK // 9qm: LOW-9 QUOTATION MARK // 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>. - /* 140 */ "\u2039,\u203A", - /* 141 */ "\u2039|\u203A,\u203A|\u2039", - /* 142 */ "\u203A,\u2039", - /* 143 */ "\u00AB,\u00BB", - /* 144 */ "\u00AB|\u00BB,\u00BB|\u00AB", - /* 145 */ "\u00BB,\u00AB", + /* single_laqm_raqm */ "!text/keyspec_left_single_angle_quote,!text/keyspec_right_single_angle_quote", + /* single_raqm_laqm */ "!text/keyspec_right_single_angle_quote,!text/keyspec_left_single_angle_quote", + /* double_laqm_raqm */ "!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote", + /* double_raqm_laqm */ "!text/keyspec_right_double_angle_quote,!text/keyspec_left_double_angle_quote", // 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>. - /* 146 */ "\u201A,\u2018,\u2019", - /* 147 */ "\u2019,\u201A,\u2018", - /* 148 */ "\u2018,\u201A,\u2019", - /* 149 */ "\u201E,\u201C,\u201D", - /* 150 */ "\u201D,\u201E,\u201C", - /* 151 */ "\u201C,\u201E,\u201D", - /* 152 */ "!fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes", - /* 153 */ "!fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes", - /* 154 */ "!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes", - /* 155 */ "!icon/emoji_key|!code/key_emoji", + /* single_lqm_rqm */ "\u201A,\u2018,\u2019", + /* single_9qm_lqm */ "\u2019,\u201A,\u2018", + /* single_9qm_rqm */ "\u2018,\u201A,\u2019", + /* single_rqm_9qm */ "\u2018,\u2019,\u201A", + /* double_lqm_rqm */ "\u201E,\u201C,\u201D", + /* double_9qm_lqm */ "\u201D,\u201E,\u201C", + /* double_9qm_rqm */ "\u201C,\u201E,\u201D", + /* double_rqm_9qm */ "\u201C,\u201D,\u201E", + /* more_keys_for_single_quote */ "!fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes", + /* more_keys_for_double_quote */ "!fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes", + /* more_keys_for_tablet_double_quote */ "!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes", + /* emoji_key_as_more_key */ "!icon/emoji_key|!code/key_emoji", }; /* Language af: Afrikaans */ @@ -423,7 +475,22 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E1,\u00E2,\u00E4,\u00E0,\u00E6,\u00E3,\u00E5,\u0101", + /* more_keys_for_a */ "\u00E1,\u00E2,\u00E4,\u00E0,\u00E6,\u00E3,\u00E5,\u0101", + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + /* more_keys_for_o */ "\u00F3,\u00F4,\u00F6,\u00F2,\u00F5,\u0153,\u00F8,\u014D", + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + /* more_keys_for_u */ "\u00FA,\u00FB,\u00FC,\u00F9,\u016B", // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -431,7 +498,7 @@ public final class KeyboardTextsTable { // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS @@ -439,76 +506,116 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+0133: "ij" LATIN SMALL LIGATURE IJ - /* 2 */ "\u00ED,\u00EC,\u00EF,\u00EE,\u012F,\u012B,\u0133", - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F3,\u00F4,\u00F6,\u00F2,\u00F5,\u0153,\u00F8,\u014D", - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u00FB,\u00FC,\u00F9,\u016B", - /* 5 */ null, + /* more_keys_for_i */ "\u00ED,\u00EC,\u00EF,\u00EE,\u012F,\u012B,\u0133", + /* double_quotes ~ */ + null, null, null, null, + /* ~ more_keys_for_s */ // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u00F1,\u0144", - /* 7 */ null, + /* more_keys_for_n */ "\u00F1,\u0144", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0133: "ij" LATIN SMALL LIGATURE IJ - /* 8 */ "\u00FD,\u0133", + /* more_keys_for_y */ "\u00FD,\u0133", }; /* Language ar: Arabic */ private static final String[] LANGUAGE_ar = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ // 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 - /* 51 */ "\u0623\u200C\u0628\u200C\u062C", - /* 52 */ null, - /* 53 */ null, - /* 54 */ "!text/single_laqm_raqm_rtl", - /* 55 */ "!text/double_laqm_raqm_rtl", - /* 56~ */ - null, null, null, - /* ~58 */ - /* 59 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(", - /* 60 */ null, - /* 61 */ null, + /* label_to_alpha_key */ "\u0623\u200C\u0628\u200C\u062C", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, + /* ~ more_keys_for_cyrillic_soft_sign */ + /* more_keys_for_punctuation */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(", + /* more_keys_for_nordic_row2_11 */ null, + // U+0661: "١" ARABIC-INDIC DIGIT ONE + /* keylabel_for_symbols_1 */ "\u0661", + // U+0662: "٢" ARABIC-INDIC DIGIT TWO + /* keylabel_for_symbols_2 */ "\u0662", + // U+0663: "٣" ARABIC-INDIC DIGIT THREE + /* keylabel_for_symbols_3 */ "\u0663", + // U+0664: "٤" ARABIC-INDIC DIGIT FOUR + /* keylabel_for_symbols_4 */ "\u0664", + // U+0665: "٥" ARABIC-INDIC DIGIT FIVE + /* keylabel_for_symbols_5 */ "\u0665", + // U+0666: "٦" ARABIC-INDIC DIGIT SIX + /* keylabel_for_symbols_6 */ "\u0666", + // U+0667: "٧" ARABIC-INDIC DIGIT SEVEN + /* keylabel_for_symbols_7 */ "\u0667", + // U+0668: "٨" ARABIC-INDIC DIGIT EIGHT + /* keylabel_for_symbols_8 */ "\u0668", + // U+0669: "٩" ARABIC-INDIC DIGIT NINE + /* keylabel_for_symbols_9 */ "\u0669", + // U+0660: "٠" ARABIC-INDIC DIGIT ZERO + /* keylabel_for_symbols_0 */ "\u0660", + // Label for "switch to symbols" key. + // U+061F: "؟" ARABIC QUESTION MARK + /* label_to_symbol_key */ "\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. + /* label_to_symbol_with_microphone_key */ "\u0663\u0662\u0661", + /* additional_more_keys_for_symbols_1 */ "1", + /* additional_more_keys_for_symbols_2 */ "2", + /* additional_more_keys_for_symbols_3 */ "3", + /* additional_more_keys_for_symbols_4 */ "4", + /* additional_more_keys_for_symbols_5 */ "5", + /* additional_more_keys_for_symbols_6 */ "6", + /* additional_more_keys_for_symbols_7 */ "7", + /* additional_more_keys_for_symbols_8 */ "8", + /* additional_more_keys_for_symbols_9 */ "9", + // U+066B: "٫" ARABIC DECIMAL SEPARATOR + // U+066C: "٬" ARABIC THOUSANDS SEPARATOR + /* additional_more_keys_for_symbols_0 */ "0,\u066B,\u066C", // U+2605: "★" BLACK STAR // U+066D: "٭" ARABIC FIVE POINTED STAR - /* 62 */ "\u2605,\u066D", - // U+266A: "♪" EIGHTH NOTE - /* 63 */ "\u266A", - /* 64 */ 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 - /* 65 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]", - /* 66 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[", + /* more_keys_for_star */ "\u2605,\u066D", // 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 - /* 67 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB", - /* 68 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB", + /* keyspec_left_parenthesis */ "(|)", + /* keyspec_right_parenthesis */ ")|(", + /* keyspec_left_square_bracket */ "[|]", + /* keyspec_right_square_bracket */ "]|[", + /* keyspec_left_curly_bracket */ "{|}", + /* keyspec_right_curly_bracket */ "}|{", + /* keyspec_less_than */ "<|>", + /* keyspec_greater_than */ ">|<", + /* keyspec_less_than_equal */ "\u2264|\u2265", + /* keyspec_greater_than_equal */ "\u2265|\u2264", + /* keyspec_left_double_angle_quote */ "\u00AB|\u00BB", + /* keyspec_right_double_angle_quote */ "\u00BB|\u00AB", + /* keyspec_left_single_angle_quote */ "\u2039|\u203A", + /* keyspec_right_single_angle_quote */ "\u203A|\u2039", + // U+061F: "؟" ARABIC QUESTION MARK + // U+060C: "،" ARABIC COMMA + // U+061B: "؛" ARABIC SEMICOLON + /* keylabel_for_tablet_comma */ "\u060C", + /* more_keys_for_tablet_period */ "!text/more_keys_for_arabic_diacritics", + // U+00BF: "¿" INVERTED QUESTION MARK + /* more_keys_for_question */ "?,\u00BF", + /* more_keys_for_h ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, + /* ~ keylabel_for_spanish_row2_10 */ + // U+266A: "♪" EIGHTH NOTE + /* more_keys_for_bullet */ "\u266A", + // 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 + /* more_keys_for_left_parenthesis */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,!text/keyspecs_for_left_parenthesis_more_keys", + /* more_keys_for_right_parenthesis */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,!text/keyspecs_for_right_parenthesis_more_keys", // U+0655: "ٕ" ARABIC HAMZA BELOW // U+0654: "ٔ" ARABIC HAMZA ABOVE // U+0652: "ْ" ARABIC SUKUN @@ -525,90 +632,29 @@ public final class KeyboardTextsTable { // 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. - /* 69 */ "!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", - // U+0661: "١" ARABIC-INDIC DIGIT ONE - /* 70 */ "\u0661", - // U+0662: "٢" ARABIC-INDIC DIGIT TWO - /* 71 */ "\u0662", - // U+0663: "٣" ARABIC-INDIC DIGIT THREE - /* 72 */ "\u0663", - // U+0664: "٤" ARABIC-INDIC DIGIT FOUR - /* 73 */ "\u0664", - // U+0665: "٥" ARABIC-INDIC DIGIT FIVE - /* 74 */ "\u0665", - // U+0666: "٦" ARABIC-INDIC DIGIT SIX - /* 75 */ "\u0666", - // U+0667: "٧" ARABIC-INDIC DIGIT SEVEN - /* 76 */ "\u0667", - // U+0668: "٨" ARABIC-INDIC DIGIT EIGHT - /* 77 */ "\u0668", - // U+0669: "٩" ARABIC-INDIC DIGIT NINE - /* 78 */ "\u0669", - // U+0660: "٠" ARABIC-INDIC DIGIT ZERO - /* 79 */ "\u0660", - // Label for "switch to symbols" key. - // U+061F: "؟" ARABIC QUESTION MARK - /* 80 */ "\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. - /* 81 */ "\u0663\u0662\u0661", - /* 82 */ "1", - /* 83 */ "2", - /* 84 */ "3", - /* 85 */ "4", - /* 86 */ "5", - /* 87 */ "6", - /* 88 */ "7", - /* 89 */ "8", - /* 90 */ "9", - // U+066B: "٫" ARABIC DECIMAL SEPARATOR - // U+066C: "٬" ARABIC THOUSANDS SEPARATOR - /* 91 */ "0,\u066B,\u066C", - /* 92~ */ - null, null, null, null, null, null, null, null, null, null, - /* ~101 */ + /* more_keys_for_arabic_diacritics */ "!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", // U+060C: "،" ARABIC COMMA - /* 102 */ "\u060C", - /* 103 */ "\\,", - // U+061F: "؟" ARABIC QUESTION MARK - // U+060C: "،" ARABIC COMMA - // U+061B: "؛" ARABIC SEMICOLON - /* 104 */ "\u060C", - /* 105 */ "\u061F", - /* 106 */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\",\'", - /* 107 */ null, + /* keylabel_for_comma */ "\u060C", + /* more_keys_for_comma */ "\\,", + /* keyhintlabel_for_tablet_comma */ "\u061F", + /* more_keys_for_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\",\'", // U+0651: "ّ" ARABIC SHADDA - /* 108 */ "\u0651", - /* 109 */ "!text/more_keys_for_arabic_diacritics", - /* 110 */ null, - /* 111 */ "\u0651", - /* 112 */ "!text/more_keys_for_arabic_diacritics", - /* 113 */ "\u061F", - /* 114 */ "\u061B", + /* keyhintlabel_for_period */ "\u0651", + /* more_keys_for_period */ "!text/more_keys_for_arabic_diacritics", + /* keyhintlabel_for_tablet_period */ "\u0651", + /* keylabel_for_symbols_question */ "\u061F", + /* keylabel_for_symbols_semicolon */ "\u061B", // U+066A: "٪" ARABIC PERCENT SIGN - /* 115 */ "\u066A", - /* 116 */ null, - // U+00BF: "¿" INVERTED QUESTION MARK - /* 117 */ "?,\u00BF", - /* 118 */ ";", + /* keylabel_for_symbols_percent */ "\u066A", + /* more_keys_for_symbols_semicolon */ ";", // U+2030: "‰" PER MILLE SIGN - /* 119 */ "\\%,\u2030", + /* more_keys_for_symbols_percent */ "\\%,\u2030", }; /* Language az_AZ: Azerbaijani (Azerbaijan) */ private static final String[] LANGUAGE_az_AZ = { // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - /* 0 */ "\u00E2", - // 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", + /* more_keys_for_a */ "\u00E2", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+0153: "œ" LATIN SMALL LIGATURE OE @@ -617,84 +663,91 @@ public final class KeyboardTextsTable { // 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", + /* more_keys_for_o */ "\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", + /* more_keys_for_u */ "\u00FC,\u00FB,\u00F9,\u00FA,\u016B", + // U+0259: "ə" LATIN SMALL LETTER SCHWA + /* more_keys_for_e */ "\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 + /* more_keys_for_i */ "\u0131,\u00EE,\u00EF,\u00EC,\u00ED,\u012F,\u012B", + /* double_quotes */ null, + /* single_quotes */ 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 + /* more_keys_for_c */ "\u00E7,\u0107,\u010D", // 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~ */ + /* more_keys_for_s */ "\u015F,\u00DF,\u015B,\u0161", + /* more_keys_for_n ~ */ null, null, null, null, null, null, null, - /* ~14 */ + /* ~ more_keys_for_l */ // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE - /* 15 */ "\u011F", + /* more_keys_for_g */ "\u011F", }; /* Language be_BY: Belarusian (Belarus) */ private static final String[] LANGUAGE_be_BY = { - /* 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 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + /* more_keys_for_c ~ */ + null, null, null, + /* ~ more_keys_for_n */ + // Label for "switch to alphabetic" key. + // U+0410: "А" CYRILLIC CAPITAL LETTER A + // U+0411: "Б" CYRILLIC CAPITAL LETTER BE + // U+0412: "В" CYRILLIC CAPITAL LETTER VE + /* label_to_alpha_key */ "\u0410\u0411\u0412", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ keylabel_for_nordic_row2_11 */ + // U+0451: "ё" CYRILLIC SMALL LETTER IO + /* more_keys_for_cyrillic_ie */ "\u0451", + /* more_keys_for_nordic_row2_10 */ null, // U+045E: "ў" CYRILLIC SMALL LETTER SHORT U - /* 25 */ "\u045E", + /* keylabel_for_east_slavic_row1_9 */ "\u045E", // U+0451: "ё" CYRILLIC SMALL LETTER IO - /* 26 */ "\u0451", + /* keylabel_for_east_slavic_row1_12 */ "\u0451", // U+044B: "ы" CYRILLIC SMALL LETTER YERU - /* 27 */ "\u044B", + /* keylabel_for_east_slavic_row2_1 */ "\u044B", // U+044D: "э" CYRILLIC SMALL LETTER E - /* 28 */ "\u044D", + /* keylabel_for_east_slavic_row2_11 */ "\u044D", // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I - /* 29 */ "\u0456", - /* 30~ */ - null, null, null, null, null, null, null, - /* ~36 */ + /* keylabel_for_east_slavic_row3_5 */ "\u0456", // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 37 */ "\u044A", - /* 38~ */ - null, null, null, null, null, - /* ~42 */ - // U+0451: "ё" CYRILLIC SMALL LETTER IO - /* 43 */ "\u0451", - /* 44~ */ - null, null, null, null, null, null, null, - /* ~50 */ - // Label for "switch to alphabetic" key. - // U+0410: "А" CYRILLIC CAPITAL LETTER A - // U+0411: "Б" CYRILLIC CAPITAL LETTER BE - // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 51 */ "\u0410\u0411\u0412", - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", + /* more_keys_for_cyrillic_soft_sign */ "\u044A", }; /* Language bg: Bulgarian */ private static final String[] LANGUAGE_bg = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, + /* ~ more_keys_for_i */ + // single_quotes of Bulgarian is default single_quotes_right_left. + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes ~ */ + null, null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 51 */ "\u0410\u0411\u0412", - /* 52 */ null, - // single_quotes of Bulgarian is default single_quotes_right_left. - /* 53 */ "!text/double_9qm_lqm", + /* label_to_alpha_key */ "\u0410\u0411\u0412", }; /* Language ca: Catalan */ @@ -709,22 +762,7 @@ public final class KeyboardTextsTable { // U+00E6: "æ" LATIN SMALL LETTER AE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON // U+00AA: "ª" FEMININE ORDINAL INDICATOR - /* 0 */ "\u00E0,\u00E1,\u00E4,\u00E2,\u00E3,\u00E5,\u0105,\u00E6,\u0101,\u00AA", - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E8,\u00E9,\u00EB,\u00EA,\u0119,\u0117,\u0113", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - /* 2 */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", + /* more_keys_for_a */ "\u00E0,\u00E1,\u00E4,\u00E2,\u00E3,\u00E5,\u0105,\u00E6,\u0101,\u00AA", // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -734,37 +772,63 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00BA: "º" MASCULINE ORDINAL INDICATOR - /* 3 */ "\u00F2,\u00F3,\u00F6,\u00F4,\u00F5,\u00F8,\u0153,\u014D,\u00BA", + /* more_keys_for_o */ "\u00F2,\u00F3,\u00F6,\u00F4,\u00F5,\u00F8,\u0153,\u014D,\u00BA", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", - /* 5 */ null, - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u00F1,\u0144", + /* more_keys_for_u */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E8,\u00E9,\u00EB,\u00EA,\u0119,\u0117,\u0113", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", + /* double_quotes */ null, + /* single_quotes */ 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, - /* ~13 */ + /* more_keys_for_c */ "\u00E7,\u0107,\u010D", + /* more_keys_for_s */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u00F1,\u0144", + /* label_to_alpha_key ~ */ + null, null, null, null, null, + /* ~ more_keys_for_t */ // U+00B7: "·" MIDDLE DOT // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE - /* 14 */ "l\u00B7l,\u0142", - /* 15~ */ + /* more_keys_for_l */ "l\u00B7l,\u0142", + /* more_keys_for_g ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, + /* ~ more_keys_for_cyrillic_soft_sign */ + // U+00B7: "·" MIDDLE DOT + /* more_keys_for_punctuation */ "!fixedColumnOrder!9,;,/,(,),#,\u00B7,!,\\,,?,&,\\%,+,\",-,:,',@", + /* more_keys_for_nordic_row2_11 ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~58 */ - // U+00B7: "·" MIDDLE DOT - /* 59 */ "!fixedColumnOrder!9,;,/,(,),#,\u00B7,!,\\,,?,&,\\%,+,\",-,:,',@", - /* 60 */ "!fixedColumnOrder!8,;,/,(,),#,\u00B7,',\\,,&,\\%,+,\",-,:,@", + /* ~ more_keys_for_swiss_row2_11 */ // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - /* 61 */ "\u00E7", + /* keylabel_for_spanish_row2_10 */ "\u00E7", + /* more_keys_for_bullet ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, + /* ~ more_keys_for_currency_dollar */ + /* more_keys_for_tablet_punctuation */ "!fixedColumnOrder!8,;,/,(,),#,\u00B7,',\\,,&,\\%,+,\",-,:,@", }; /* Language cs: Czech */ @@ -777,23 +841,7 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E1,\u00E0,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+011B: "ě" LATIN SMALL LETTER E WITH CARON - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u011B,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // 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+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - /* 2 */ "\u00ED,\u00EE,\u00EF,\u00EC,\u012F,\u012B", + /* more_keys_for_a */ "\u00E1,\u00E0,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -802,48 +850,63 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", + /* more_keys_for_o */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u016F,\u00FB,\u00FC,\u00F9,\u016B", + /* more_keys_for_u */ "\u00FA,\u016F,\u00FB,\u00FC,\u00F9,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+011B: "ě" LATIN SMALL LETTER E WITH CARON + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u011B,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // 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+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00ED,\u00EE,\u00EF,\u00EC,\u012F,\u012B", + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + /* more_keys_for_c */ "\u010D,\u00E7,\u0107", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE - /* 5 */ "\u0161,\u00DF,\u015B", + /* more_keys_for_s */ "\u0161,\u00DF,\u015B", // U+0148: "ň" LATIN SMALL LETTER N WITH CARON // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u0148,\u00F1,\u0144", - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - /* 7 */ "\u010D,\u00E7,\u0107", + /* more_keys_for_n */ "\u0148,\u00F1,\u0144", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - /* 8 */ "\u00FD,\u00FF", + /* more_keys_for_y */ "\u00FD,\u00FF", // U+010F: "ď" LATIN SMALL LETTER D WITH CARON - /* 9 */ "\u010F", - // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - /* 10 */ "\u0159", - // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - /* 11 */ "\u0165", + /* more_keys_for_d */ "\u010F", // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - /* 12 */ "\u017E,\u017A,\u017C", - /* 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, - null, null, null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", - /* 54 */ "!text/single_raqm_laqm", - /* 55 */ "!text/double_raqm_laqm", + /* more_keys_for_z */ "\u017E,\u017A,\u017C", + // U+0165: "ť" LATIN SMALL LETTER T WITH CARON + /* more_keys_for_t */ "\u0165", + /* more_keys_for_l */ null, + /* more_keys_for_g */ null, + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", + /* keylabel_for_currency */ null, + // U+0159: "ř" LATIN SMALL LETTER R WITH CARON + /* more_keys_for_r */ "\u0159", }; /* Language da: Danish */ @@ -854,65 +917,66 @@ public final class KeyboardTextsTable { // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E1,\u00E4,\u00E0,\u00E2,\u00E3,\u0101", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - /* 1 */ "\u00E9,\u00EB", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - /* 2 */ "\u00ED,\u00EF", + /* more_keys_for_a */ "\u00E1,\u00E4,\u00E0,\u00E2,\u00E3,\u0101", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+0153: "œ" LATIN SMALL LIGATURE OE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F3,\u00F4,\u00F2,\u00F5,\u0153,\u014D", + /* more_keys_for_o */ "\u00F3,\u00F4,\u00F2,\u00F5,\u0153,\u014D", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // 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+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u00FC,\u00FB,\u00F9,\u016B", + /* more_keys_for_u */ "\u00FA,\u00FC,\u00FB,\u00F9,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + /* more_keys_for_e */ "\u00E9,\u00EB", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + /* more_keys_for_i */ "\u00ED,\u00EF", + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + /* more_keys_for_c */ null, // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON - /* 5 */ "\u00DF,\u015B,\u0161", + /* more_keys_for_s */ "\u00DF,\u015B,\u0161", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u00F1,\u0144", - /* 7 */ null, + /* more_keys_for_n */ "\u00F1,\u0144", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - /* 8 */ "\u00FD,\u00FF", + /* more_keys_for_y */ "\u00FD,\u00FF", // U+00F0: "ð" LATIN SMALL LETTER ETH - /* 9 */ "\u00F0", - /* 10~ */ - null, null, null, null, - /* ~13 */ + /* more_keys_for_d */ "\u00F0", + /* more_keys_for_z */ null, + /* more_keys_for_t */ null, // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE - /* 14 */ "\u0142", - /* 15~ */ - null, null, null, null, null, - /* ~19 */ + /* more_keys_for_l */ "\u0142", + /* more_keys_for_g */ null, + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", + /* keylabel_for_currency ~ */ + null, null, null, + /* ~ more_keys_for_k */ // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - /* 20 */ "\u00E5", + /* keylabel_for_nordic_row1_11 */ "\u00E5", // U+00E6: "æ" LATIN SMALL LETTER AE - /* 21 */ "\u00E6", + /* keylabel_for_nordic_row2_10 */ "\u00E6", // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - /* 22 */ "\u00F8", + /* keylabel_for_nordic_row2_11 */ "\u00F8", + /* more_keys_for_cyrillic_ie */ null, // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - /* 23 */ "\u00E4", + /* more_keys_for_nordic_row2_10 */ "\u00E4", + /* keylabel_for_east_slavic_row1_9 ~ */ + null, null, null, null, null, null, null, + /* ~ more_keys_for_punctuation */ // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - /* 24 */ "\u00F6", - /* 25~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", - /* 54 */ "!text/single_raqm_laqm", - /* 55 */ "!text/double_raqm_laqm", + /* more_keys_for_nordic_row2_11 */ "\u00F6", }; /* Language de: German */ @@ -925,14 +989,7 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E4,\u00E2,\u00E0,\u00E1,\u00E6,\u00E3,\u00E5,\u0101", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - /* 1 */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0117", - /* 2 */ null, + /* more_keys_for_a */ "\u00E4,\u00E2,\u00E0,\u00E1,\u00E6,\u00E3,\u00E5,\u0101", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -941,57 +998,66 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F6,\u00F4,\u00F2,\u00F3,\u00F5,\u0153,\u00F8,\u014D", + /* more_keys_for_o */ "\u00F6,\u00F4,\u00F2,\u00F3,\u00F5,\u0153,\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", + /* more_keys_for_u */ "\u00FC,\u00FB,\u00F9,\u00FA,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0117", + /* more_keys_for_i */ null, + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + /* more_keys_for_c */ null, // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON - /* 5 */ "\u00DF,\u015B,\u0161", + /* more_keys_for_s */ "\u00DF,\u015B,\u0161", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u00F1,\u0144", - /* 7~ */ + /* more_keys_for_n */ "\u00F1,\u0144", + /* label_to_alpha_key ~ */ + null, null, null, null, null, null, null, + /* ~ more_keys_for_g */ + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", + /* keylabel_for_currency ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~44 */ + /* ~ more_keys_for_cyrillic_i */ // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - /* 45 */ "\u00FC", + /* keylabel_for_swiss_row1_11 */ "\u00FC", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - /* 46 */ "\u00F6", + /* keylabel_for_swiss_row2_10 */ "\u00F6", // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - /* 47 */ "\u00E4", + /* keylabel_for_swiss_row2_11 */ "\u00E4", // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - /* 48 */ "\u00E8", + /* more_keys_for_swiss_row1_11 */ "\u00E8", // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - /* 49 */ "\u00E9", + /* more_keys_for_swiss_row2_10 */ "\u00E9", // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - /* 50 */ "\u00E0", - /* 51 */ null, - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", - /* 54 */ "!text/single_raqm_laqm", - /* 55 */ "!text/double_raqm_laqm", + /* more_keys_for_swiss_row2_11 */ "\u00E0", }; /* Language el: Greek */ private static final String[] LANGUAGE_el = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+0391: "Α" GREEK CAPITAL LETTER ALPHA // U+0392: "Β" GREEK CAPITAL LETTER BETA // U+0393: "Γ" GREEK CAPITAL LETTER GAMMA - /* 51 */ "\u0391\u0392\u0393", + /* label_to_alpha_key */ "\u0391\u0392\u0393", }; /* Language en: English */ @@ -1004,19 +1070,7 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E0,\u00E1,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0113", - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - /* 2 */ "\u00EE,\u00EF,\u00ED,\u012B,\u00EC", + /* more_keys_for_a */ "\u00E0,\u00E1,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -1025,19 +1079,33 @@ public final class KeyboardTextsTable { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - /* 3 */ "\u00F4,\u00F6,\u00F2,\u00F3,\u0153,\u00F8,\u014D,\u00F5", + /* more_keys_for_o */ "\u00F4,\u00F6,\u00F2,\u00F3,\u0153,\u00F8,\u014D,\u00F5", // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // 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 */ "\u00FB,\u00FC,\u00F9,\u00FA,\u016B", + /* more_keys_for_u */ "\u00FB,\u00FC,\u00F9,\u00FA,\u016B", + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0113", + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + /* more_keys_for_i */ "\u00EE,\u00EF,\u00ED,\u012B,\u00EC", + /* double_quotes */ null, + /* single_quotes */ null, + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + /* more_keys_for_c */ "\u00E7", // U+00DF: "ß" LATIN SMALL LETTER SHARP S - /* 5 */ "\u00DF", + /* more_keys_for_s */ "\u00DF", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - /* 6 */ "\u00F1", - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - /* 7 */ "\u00E7", + /* more_keys_for_n */ "\u00F1", }; /* Language eo: Esperanto */ @@ -1053,26 +1121,7 @@ public final class KeyboardTextsTable { // U+0103: "ă" LATIN SMALL LETTER A WITH BREVE // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK // U+00AA: "ª" FEMININE ORDINAL INDICATOR - /* 0 */ "\u00E1,\u00E0,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101,\u0103,\u0105,\u00AA", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+011B: "ě" LATIN SMALL LETTER E WITH CARON - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u011B,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+0131: "ı" LATIN SMALL LETTER DOTLESS I - // U+0133: "ij" LATIN SMALL LIGATURE IJ - /* 2 */ "\u00ED,\u00EE,\u00EF,\u0129,\u00EC,\u012F,\u012B,\u0131,\u0133", + /* more_keys_for_a */ "\u00E1,\u00E0,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101,\u0103,\u0105,\u00AA", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -1083,7 +1132,7 @@ public final class KeyboardTextsTable { // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00BA: "º" MASCULINE ORDINAL INDICATOR - /* 3 */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D,\u0151,\u00BA", + /* more_keys_for_o */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D,\u0151,\u00BA", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX @@ -1094,91 +1143,121 @@ public final class KeyboardTextsTable { // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK // U+00B5: "µ" MICRO SIGN - /* 4 */ "\u00FA,\u016F,\u00FB,\u00FC,\u00F9,\u016B,\u0169,\u0171,\u0173,\u00B5", + /* more_keys_for_u */ "\u00FA,\u016F,\u00FB,\u00FC,\u00F9,\u016B,\u0169,\u0171,\u0173,\u00B5", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+011B: "ě" LATIN SMALL LETTER E WITH CARON + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u011B,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + // U+0133: "ij" LATIN SMALL LIGATURE IJ + /* more_keys_for_i */ "\u00ED,\u00EE,\u00EF,\u0129,\u00EC,\u012F,\u012B,\u0131,\u0133", + /* double_quotes */ null, + /* single_quotes */ null, + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE + /* more_keys_for_c */ "\u0107,\u010D,\u00E7,\u010B", // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA - /* 5 */ "\u00DF,\u0161,\u015B,\u0219,\u015F", + /* more_keys_for_s */ "\u00DF,\u0161,\u015B,\u0219,\u015F", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA // U+0148: "ň" LATIN SMALL LETTER N WITH CARON // U+0149: "ʼn" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE // U+014B: "ŋ" LATIN SMALL LETTER ENG - /* 6 */ "\u00F1,\u0144,\u0146,\u0148,\u0149,\u014B", - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE - /* 7 */ "\u0107,\u010D,\u00E7,\u010B", + /* more_keys_for_n */ "\u00F1,\u0144,\u0146,\u0148,\u0149,\u014B", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS // U+00FE: "þ" LATIN SMALL LETTER THORN - /* 8 */ "y,\u00FD,\u0177,\u00FF,\u00FE", + /* more_keys_for_y */ "y,\u00FD,\u0177,\u00FF,\u00FE", // U+00F0: "ð" LATIN SMALL LETTER ETH // U+010F: "ď" LATIN SMALL LETTER D WITH CARON // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE - /* 9 */ "\u00F0,\u010F,\u0111", - // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA - /* 10 */ "\u0159,\u0155,\u0157", + /* more_keys_for_d */ "\u00F0,\u010F,\u0111", + // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE + // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE + // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON + /* more_keys_for_z */ "\u017A,\u017C,\u017E", // U+0165: "ť" LATIN SMALL LETTER T WITH CARON // U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA // U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE - /* 11 */ "\u0165,\u021B,\u0163,\u0167", - // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE - // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON - /* 12 */ "\u017A,\u017C,\u017E", - // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA - // U+0138: "ĸ" LATIN SMALL LETTER KRA - /* 13 */ "\u0137,\u0138", + /* more_keys_for_t */ "\u0165,\u021B,\u0163,\u0167", // U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE // U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA // U+013E: "ľ" LATIN SMALL LETTER L WITH CARON // U+0140: "ŀ" LATIN SMALL LETTER L WITH MIDDLE DOT // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE - /* 14 */ "\u013A,\u013C,\u013E,\u0140,\u0142", + /* more_keys_for_l */ "\u013A,\u013C,\u013E,\u0140,\u0142", // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE // U+0121: "ġ" LATIN SMALL LETTER G WITH DOT ABOVE // U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA - /* 15 */ "\u011F,\u0121,\u0123", - // U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX - /* 16 */ "w,\u0175", + /* more_keys_for_g */ "\u011F,\u0121,\u0123", + /* single_angle_quotes ~ */ + null, null, null, + /* ~ keylabel_for_currency */ + // U+0159: "ř" LATIN SMALL LETTER R WITH CARON + // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE + // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA + /* more_keys_for_r */ "\u0159,\u0155,\u0157", + // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA + // U+0138: "ĸ" LATIN SMALL LETTER KRA + /* more_keys_for_k */ "\u0137,\u0138", + /* keylabel_for_nordic_row1_11 ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + /* ~ more_keys_for_question */ // U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX // U+0127: "ħ" LATIN SMALL LETTER H WITH STROKE - /* 17 */ "\u0125,\u0127", - /* 18 */ null, + /* more_keys_for_h */ "\u0125,\u0127", // U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX - /* 19 */ "w,\u0175", - /* 20~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* more_keys_for_w */ "w,\u0175", + /* more_keys_for_cyrillic_u ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, - /* ~60 */ + null, + /* ~ more_keys_for_swiss_row2_11 */ // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX - /* 61 */ "\u0135", - /* 62~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* keylabel_for_spanish_row2_10 */ "\u0135", + /* more_keys_for_bullet ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~119 */ - /* 120 */ "q", - /* 121 */ "x", + null, + /* ~ more_keys_for_symbols_percent */ + // U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX + /* more_keys_for_v */ "w,\u0175", + /* more_keys_for_j ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_exclamation */ + /* more_keys_for_q */ "q", + /* more_keys_for_x */ "x", // U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX - /* 122 */ "\u015D", + /* keylabel_for_q */ "\u015D", // U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX - /* 123 */ "\u011D", + /* keylabel_for_w */ "\u011D", // U+016D: "ŭ" LATIN SMALL LETTER U WITH BREVE - /* 124 */ "\u016D", + /* keylabel_for_y */ "\u016D", // U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX - /* 125 */ "\u0109", + /* keylabel_for_x */ "\u0109", }; /* Language es: Spanish */ @@ -1193,22 +1272,7 @@ public final class KeyboardTextsTable { // U+00E6: "æ" LATIN SMALL LETTER AE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON // U+00AA: "ª" FEMININE ORDINAL INDICATOR - /* 0 */ "\u00E1,\u00E0,\u00E4,\u00E2,\u00E3,\u00E5,\u0105,\u00E6,\u0101,\u00AA", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u00E8,\u00EB,\u00EA,\u0119,\u0117,\u0113", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - /* 2 */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", + /* more_keys_for_a */ "\u00E1,\u00E0,\u00E4,\u00E2,\u00E3,\u00E5,\u0105,\u00E6,\u0101,\u00AA", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -1218,30 +1282,45 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00BA: "º" MASCULINE ORDINAL INDICATOR - /* 3 */ "\u00F3,\u00F2,\u00F6,\u00F4,\u00F5,\u00F8,\u0153,\u014D,\u00BA", + /* more_keys_for_o */ "\u00F3,\u00F2,\u00F6,\u00F4,\u00F5,\u00F8,\u0153,\u014D,\u00BA", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", - /* 5 */ null, - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u00F1,\u0144", + /* more_keys_for_u */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EB,\u00EA,\u0119,\u0117,\u0113", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", + /* double_quotes */ null, + /* single_quotes */ 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, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* more_keys_for_c */ "\u00E7,\u0107,\u010D", + /* more_keys_for_s */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u00F1,\u0144", + /* label_to_alpha_key ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, - /* ~58 */ + null, null, null, null, null, null, null, null, + /* ~ more_keys_for_cyrillic_soft_sign */ // U+00A1: "¡" INVERTED EXCLAMATION MARK // U+00BF: "¿" INVERTED QUESTION MARK - /* 59 */ "!fixedColumnOrder!9,\u00A1,;,/,(,),#,!,\\,,?,\u00BF,&,\\%,+,\",-,:,',@", + /* more_keys_for_punctuation */ "!fixedColumnOrder!9,\u00A1,;,/,(,),#,!,\\,,?,\u00BF,&,\\%,+,\",-,:,',@", }; /* Language et_EE: Estonian (Estonia) */ @@ -1255,24 +1334,7 @@ public final class KeyboardTextsTable { // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+00E6: "æ" LATIN SMALL LETTER AE // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK - /* 0 */ "\u00E4,\u0101,\u00E0,\u00E1,\u00E2,\u00E3,\u00E5,\u00E6,\u0105", - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+011B: "ě" LATIN SMALL LETTER E WITH CARON - /* 1 */ "\u0113,\u00E8,\u0117,\u00E9,\u00EA,\u00EB,\u0119,\u011B", - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+0131: "ı" LATIN SMALL LETTER DOTLESS I - /* 2 */ "\u012B,\u00EC,\u012F,\u00ED,\u00EE,\u00EF,\u0131", + /* more_keys_for_a */ "\u00E4,\u0101,\u00E0,\u00E1,\u00E2,\u00E3,\u00E5,\u00E6,\u0105", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -1281,7 +1343,7 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - /* 3 */ "\u00F6,\u00F5,\u00F2,\u00F3,\u00F4,\u0153,\u0151,\u00F8", + /* more_keys_for_o */ "\u00F6,\u00F5,\u00F2,\u00F3,\u00F4,\u0153,\u0151,\u00F8", // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK @@ -1290,114 +1352,181 @@ public final class KeyboardTextsTable { // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE - /* 4 */ "\u00FC,\u016B,\u0173,\u00F9,\u00FA,\u00FB,\u016F,\u0171", + /* more_keys_for_u */ "\u00FC,\u016B,\u0173,\u00F9,\u00FA,\u00FB,\u016F,\u0171", + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+011B: "ě" LATIN SMALL LETTER E WITH CARON + /* more_keys_for_e */ "\u0113,\u00E8,\u0117,\u00E9,\u00EA,\u00EB,\u0119,\u011B", + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + /* more_keys_for_i */ "\u012B,\u00EC,\u012F,\u00ED,\u00EE,\u00EF,\u0131", + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + /* more_keys_for_c */ "\u010D,\u00E7,\u0107", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA - /* 5 */ "\u0161,\u00DF,\u015B,\u015F", + /* more_keys_for_s */ "\u0161,\u00DF,\u015B,\u015F", // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u0146,\u00F1,\u0144,\u0144", - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - /* 7 */ "\u010D,\u00E7,\u0107", + /* more_keys_for_n */ "\u0146,\u00F1,\u0144,\u0144", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - /* 8 */ "\u00FD,\u00FF", + /* more_keys_for_y */ "\u00FD,\u00FF", // U+010F: "ď" LATIN SMALL LETTER D WITH CARON - /* 9 */ "\u010F", - // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA - // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - /* 10 */ "\u0157,\u0159,\u0155", - // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA - // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - /* 11 */ "\u0163,\u0165", + /* more_keys_for_d */ "\u010F", // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE - /* 12 */ "\u017E,\u017C,\u017A", - // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA - /* 13 */ "\u0137", + /* more_keys_for_z */ "\u017E,\u017C,\u017A", + // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA + // U+0165: "ť" LATIN SMALL LETTER T WITH CARON + /* more_keys_for_t */ "\u0163,\u0165", // U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE // U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE // U+013E: "ľ" LATIN SMALL LETTER L WITH CARON - /* 14 */ "\u013C,\u0142,\u013A,\u013E", + /* more_keys_for_l */ "\u013C,\u0142,\u013A,\u013E", // U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE - /* 15 */ "\u0123,\u011F", - /* 16~ */ - null, null, null, null, - /* ~19 */ + /* more_keys_for_g */ "\u0123,\u011F", + /* single_angle_quotes ~ */ + null, null, null, + /* ~ keylabel_for_currency */ + // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA + // U+0159: "ř" LATIN SMALL LETTER R WITH CARON + // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE + /* more_keys_for_r */ "\u0157,\u0159,\u0155", + // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA + /* more_keys_for_k */ "\u0137", // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - /* 20 */ "\u00FC", + /* keylabel_for_nordic_row1_11 */ "\u00FC", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - /* 21 */ "\u00F6", + /* keylabel_for_nordic_row2_10 */ "\u00F6", // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - /* 22 */ "\u00E4", + /* keylabel_for_nordic_row2_11 */ "\u00E4", + /* more_keys_for_cyrillic_ie */ null, // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - /* 23 */ "\u00F5", - /* 24~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", + /* more_keys_for_nordic_row2_10 */ "\u00F5", }; /* Language fa: Persian */ private static final String[] LANGUAGE_fa = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ // 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 - /* 51 */ "\u0627\u200C\u0628\u200C\u067E", - /* 52 */ null, - /* 53 */ null, - /* 54 */ "!text/single_laqm_raqm_rtl", - /* 55 */ "!text/double_laqm_raqm_rtl", - /* 56 */ null, + /* label_to_alpha_key */ "\u0627\u200C\u0628\u200C\u067E", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, + /* ~ double_angle_quotes */ // U+FDFC: "﷼" RIAL SIGN - /* 57 */ "\uFDFC", - /* 58 */ null, + /* keylabel_for_currency */ "\uFDFC", + /* more_keys_for_r ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_cyrillic_soft_sign */ // U+061F: "؟" ARABIC QUESTION MARK // U+060C: "،" ARABIC COMMA // U+061B: "؛" ARABIC SEMICOLON - /* 59 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(", - /* 60 */ null, - /* 61 */ null, + /* more_keys_for_punctuation */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,!text/keyspec_left_parenthesis,!text/keyspec_right_parenthesis", + /* more_keys_for_nordic_row2_11 */ null, + // U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE + /* keylabel_for_symbols_1 */ "\u06F1", + // U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO + /* keylabel_for_symbols_2 */ "\u06F2", + // U+06F3: "۳" EXTENDED ARABIC-INDIC DIGIT THREE + /* keylabel_for_symbols_3 */ "\u06F3", + // U+06F4: "۴" EXTENDED ARABIC-INDIC DIGIT FOUR + /* keylabel_for_symbols_4 */ "\u06F4", + // U+06F5: "۵" EXTENDED ARABIC-INDIC DIGIT FIVE + /* keylabel_for_symbols_5 */ "\u06F5", + // U+06F6: "۶" EXTENDED ARABIC-INDIC DIGIT SIX + /* keylabel_for_symbols_6 */ "\u06F6", + // U+06F7: "۷" EXTENDED ARABIC-INDIC DIGIT SEVEN + /* keylabel_for_symbols_7 */ "\u06F7", + // U+06F8: "۸" EXTENDED ARABIC-INDIC DIGIT EIGHT + /* keylabel_for_symbols_8 */ "\u06F8", + // U+06F9: "۹" EXTENDED ARABIC-INDIC DIGIT NINE + /* keylabel_for_symbols_9 */ "\u06F9", + // U+06F0: "۰" EXTENDED ARABIC-INDIC DIGIT ZERO + /* keylabel_for_symbols_0 */ "\u06F0", + // Label for "switch to symbols" key. + // U+061F: "؟" ARABIC QUESTION MARK + /* label_to_symbol_key */ "\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. + /* label_to_symbol_with_microphone_key */ "\u06F3\u06F2\u06F1", + /* additional_more_keys_for_symbols_1 */ "1", + /* additional_more_keys_for_symbols_2 */ "2", + /* additional_more_keys_for_symbols_3 */ "3", + /* additional_more_keys_for_symbols_4 */ "4", + /* additional_more_keys_for_symbols_5 */ "5", + /* additional_more_keys_for_symbols_6 */ "6", + /* additional_more_keys_for_symbols_7 */ "7", + /* additional_more_keys_for_symbols_8 */ "8", + /* additional_more_keys_for_symbols_9 */ "9", + // U+066B: "٫" ARABIC DECIMAL SEPARATOR + // U+066C: "٬" ARABIC THOUSANDS SEPARATOR + /* additional_more_keys_for_symbols_0 */ "0,\u066B,\u066C", // U+2605: "★" BLACK STAR // U+066D: "٭" ARABIC FIVE POINTED STAR - /* 62 */ "\u2605,\u066D", + /* more_keys_for_star */ "\u2605,\u066D", + /* keyspec_left_parenthesis */ "(|)", + /* keyspec_right_parenthesis */ ")|(", + /* keyspec_left_square_bracket */ "[|]", + /* keyspec_right_square_bracket */ "]|[", + /* keyspec_left_curly_bracket */ "{|}", + /* keyspec_right_curly_bracket */ "}|{", + /* keyspec_less_than */ "<|>", + /* keyspec_greater_than */ ">|<", + /* keyspec_less_than_equal */ "\u2264|\u2265", + /* keyspec_greater_than_equal */ "\u2265|\u2264", + /* keyspec_left_double_angle_quote */ "\u00AB|\u00BB", + /* keyspec_right_double_angle_quote */ "\u00BB|\u00AB", + /* keyspec_left_single_angle_quote */ "\u2039|\u203A", + /* keyspec_right_single_angle_quote */ "\u203A|\u2039", + // 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 + /* keylabel_for_tablet_comma */ "\u060C", + /* more_keys_for_tablet_period */ "!text/more_keys_for_arabic_diacritics", + // U+00BF: "¿" INVERTED QUESTION MARK + /* more_keys_for_question */ "?,\u00BF", + /* more_keys_for_h ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, + /* ~ keylabel_for_spanish_row2_10 */ // U+266A: "♪" EIGHTH NOTE - /* 63 */ "\u266A", - /* 64 */ null, + /* more_keys_for_bullet */ "\u266A", // 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 - /* 65 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]", - /* 66 */ "!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 - /* 67 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,<|>", - /* 68 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,>|<", + /* more_keys_for_left_parenthesis */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,!text/keyspecs_for_left_parenthesis_more_keys", + /* more_keys_for_right_parenthesis */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,!text/keyspecs_for_right_parenthesis_more_keys", // U+0655: "ٕ" ARABIC HAMZA BELOW // U+0652: "ْ" ARABIC SUKUN // U+0651: "ّ" ARABIC SHADDA @@ -1414,76 +1543,34 @@ public final class KeyboardTextsTable { // 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. - /* 69 */ "!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", - // U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE - /* 70 */ "\u06F1", - // U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO - /* 71 */ "\u06F2", - // U+06F3: "۳" EXTENDED ARABIC-INDIC DIGIT THREE - /* 72 */ "\u06F3", - // U+06F4: "۴" EXTENDED ARABIC-INDIC DIGIT FOUR - /* 73 */ "\u06F4", - // U+06F5: "۵" EXTENDED ARABIC-INDIC DIGIT FIVE - /* 74 */ "\u06F5", - // U+06F6: "۶" EXTENDED ARABIC-INDIC DIGIT SIX - /* 75 */ "\u06F6", - // U+06F7: "۷" EXTENDED ARABIC-INDIC DIGIT SEVEN - /* 76 */ "\u06F7", - // U+06F8: "۸" EXTENDED ARABIC-INDIC DIGIT EIGHT - /* 77 */ "\u06F8", - // U+06F9: "۹" EXTENDED ARABIC-INDIC DIGIT NINE - /* 78 */ "\u06F9", - // U+06F0: "۰" EXTENDED ARABIC-INDIC DIGIT ZERO - /* 79 */ "\u06F0", - // Label for "switch to symbols" key. - // U+061F: "؟" ARABIC QUESTION MARK - /* 80 */ "\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. - /* 81 */ "\u06F3\u06F2\u06F1", - /* 82 */ "1", - /* 83 */ "2", - /* 84 */ "3", - /* 85 */ "4", - /* 86 */ "5", - /* 87 */ "6", - /* 88 */ "7", - /* 89 */ "8", - /* 90 */ "9", - // U+066B: "٫" ARABIC DECIMAL SEPARATOR - // U+066C: "٬" ARABIC THOUSANDS SEPARATOR - /* 91 */ "0,\u066B,\u066C", - /* 92~ */ - null, null, null, null, null, null, null, null, null, null, - /* ~101 */ + /* more_keys_for_arabic_diacritics */ "!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", // U+060C: "،" ARABIC COMMA - /* 102 */ "\u060C", - /* 103 */ "\\,", - // 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 - /* 104 */ "\u060C", - /* 105 */ "\u061F", - /* 106 */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\u00AB|\u00BB,\u00BB|\u00AB", - /* 107 */ null, + /* keylabel_for_comma */ "\u060C", + /* more_keys_for_comma */ "\\,", + /* keyhintlabel_for_tablet_comma */ "\u061F", + /* more_keys_for_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote", // U+064B: "ً" ARABIC FATHATAN - /* 108 */ "\u064B", - /* 109 */ "!text/more_keys_for_arabic_diacritics", - /* 110 */ null, - /* 111 */ "\u064B", - /* 112 */ "!text/more_keys_for_arabic_diacritics", - /* 113 */ "\u061F", - /* 114 */ "\u061B", + /* keyhintlabel_for_period */ "\u064B", + /* more_keys_for_period */ "!text/more_keys_for_arabic_diacritics", + /* keyhintlabel_for_tablet_period */ "\u064B", + /* keylabel_for_symbols_question */ "\u061F", + /* keylabel_for_symbols_semicolon */ "\u061B", // U+066A: "٪" ARABIC PERCENT SIGN - /* 115 */ "\u066A", - /* 116 */ null, - // U+00BF: "¿" INVERTED QUESTION MARK - /* 117 */ "?,\u00BF", - /* 118 */ ";", + /* keylabel_for_symbols_percent */ "\u066A", + /* more_keys_for_symbols_semicolon */ ";", // U+2030: "‰" PER MILLE SIGN - /* 119 */ "\\%,\u2030", + /* more_keys_for_symbols_percent */ "\\%,\u2030", + /* more_keys_for_v ~ */ + null, null, null, null, null, null, null, null, + /* ~ more_keys_for_plus */ + // 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 + /* more_keys_for_less_than */ "!fixedColumnOrder!3,!text/keyspec_left_single_angle_quote;,!text/keyspec_less_than_equal;,!text/keyspec_less_than", + /* more_keys_for_greater_than */ "!fixedColumnOrder!3,!text/keyspec_right_single_angle_quote;,!text/keyspec_greater_than_equal;,!text/keyspec_greater_than", }; /* Language fi: Finnish */ @@ -1494,9 +1581,7 @@ public final class KeyboardTextsTable { // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E6,\u00E0,\u00E1,\u00E2,\u00E3,\u0101", - /* 1 */ null, - /* 2 */ null, + /* more_keys_for_a */ "\u00E6,\u00E0,\u00E1,\u00E2,\u00E3,\u0101", // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -1504,33 +1589,40 @@ public final class KeyboardTextsTable { // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+0153: "œ" LATIN SMALL LIGATURE OE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F8,\u00F4,\u00F2,\u00F3,\u00F5,\u0153,\u014D", + /* more_keys_for_o */ "\u00F8,\u00F4,\u00F2,\u00F3,\u00F5,\u0153,\u014D", // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - /* 4 */ "\u00FC", + /* more_keys_for_u */ "\u00FC", + /* more_keys_for_e ~ */ + null, null, null, null, null, + /* ~ more_keys_for_c */ // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE - /* 5 */ "\u0161,\u00DF,\u015B", - /* 6~ */ - null, null, null, null, null, null, - /* ~11 */ + /* more_keys_for_s */ "\u0161,\u00DF,\u015B", + /* more_keys_for_n ~ */ + null, null, null, null, + /* ~ more_keys_for_d */ // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - /* 12 */ "\u017E,\u017A,\u017C", - /* 13~ */ - null, null, null, null, null, null, null, - /* ~19 */ + /* more_keys_for_z */ "\u017E,\u017A,\u017C", + /* more_keys_for_t ~ */ + null, null, null, null, null, null, null, null, + /* ~ more_keys_for_k */ // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - /* 20 */ "\u00E5", + /* keylabel_for_nordic_row1_11 */ "\u00E5", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - /* 21 */ "\u00F6", + /* keylabel_for_nordic_row2_10 */ "\u00F6", // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - /* 22 */ "\u00E4", + /* keylabel_for_nordic_row2_11 */ "\u00E4", + /* more_keys_for_cyrillic_ie */ null, // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - /* 23 */ "\u00F8", + /* more_keys_for_nordic_row2_10 */ "\u00F8", + /* keylabel_for_east_slavic_row1_9 ~ */ + null, null, null, null, null, null, null, + /* ~ more_keys_for_punctuation */ // U+00E6: "æ" LATIN SMALL LETTER AE - /* 24 */ "\u00E6", + /* more_keys_for_nordic_row2_11 */ "\u00E6", }; /* Language fr: French */ @@ -1544,22 +1636,7 @@ public final class KeyboardTextsTable { // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON // U+00AA: "ª" FEMININE ORDINAL INDICATOR - /* 0 */ "\u00E0,\u00E2,%,\u00E6,\u00E1,\u00E4,\u00E3,\u00E5,\u0101,\u00AA", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u00E8,\u00EA,\u00EB,%,\u0119,\u0117,\u0113", - // 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 */ "\u00EE,%,\u00EF,\u00EC,\u00ED,\u012F,\u012B", + /* more_keys_for_a */ "\u00E0,\u00E2,%,\u00E6,\u00E1,\u00E4,\u00E3,\u00E5,\u0101,\u00AA", // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+0153: "œ" LATIN SMALL LIGATURE OE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -1569,132 +1646,146 @@ public final class KeyboardTextsTable { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00BA: "º" MASCULINE ORDINAL INDICATOR - /* 3 */ "\u00F4,\u0153,%,\u00F6,\u00F2,\u00F3,\u00F5,\u00F8,\u014D,\u00BA", + /* more_keys_for_o */ "\u00F4,\u0153,%,\u00F6,\u00F2,\u00F3,\u00F5,\u00F8,\u014D,\u00BA", // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00F9,\u00FB,%,\u00FC,\u00FA,\u016B", - /* 5 */ null, - /* 6 */ null, + /* more_keys_for_u */ "\u00F9,\u00FB,%,\u00FC,\u00FA,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EA,\u00EB,%,\u0119,\u0117,\u0113", + // 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 + /* more_keys_for_i */ "\u00EE,%,\u00EF,\u00EC,\u00ED,\u012F,\u012B", + /* double_quotes */ null, + /* single_quotes */ 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", + /* more_keys_for_c */ "\u00E7,\u0107,\u010D", + /* more_keys_for_s ~ */ + null, null, null, + /* ~ label_to_alpha_key */ // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - /* 8 */ "%,\u00FF", - /* 9~ */ + /* more_keys_for_y */ "%,\u00FF", + /* more_keys_for_d ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, - /* ~44 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_cyrillic_i */ // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - /* 45 */ "\u00E8", + /* keylabel_for_swiss_row1_11 */ "\u00E8", // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - /* 46 */ "\u00E9", + /* keylabel_for_swiss_row2_10 */ "\u00E9", // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - /* 47 */ "\u00E0", + /* keylabel_for_swiss_row2_11 */ "\u00E0", // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - /* 48 */ "\u00FC", + /* more_keys_for_swiss_row1_11 */ "\u00FC", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - /* 49 */ "\u00F6", + /* more_keys_for_swiss_row2_10 */ "\u00F6", // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - /* 50 */ "\u00E4", + /* more_keys_for_swiss_row2_11 */ "\u00E4", }; /* Language hi: Hindi */ private static final String[] LANGUAGE_hi = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+0915: "क" DEVANAGARI LETTER KA // U+0916: "ख" DEVANAGARI LETTER KHA // U+0917: "ग" DEVANAGARI LETTER GA - /* 51 */ "\u0915\u0916\u0917", - /* 52~ */ - null, null, null, null, null, - /* ~56 */ + /* label_to_alpha_key */ "\u0915\u0916\u0917", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, + /* ~ double_angle_quotes */ // U+20B9: "₹" INDIAN RUPEE SIGN - /* 57 */ "\u20B9", - /* 58~ */ - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~69 */ + /* keylabel_for_currency */ "\u20B9", + /* more_keys_for_r ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_nordic_row2_11 */ // U+0967: "१" DEVANAGARI DIGIT ONE - /* 70 */ "\u0967", + /* keylabel_for_symbols_1 */ "\u0967", // U+0968: "२" DEVANAGARI DIGIT TWO - /* 71 */ "\u0968", + /* keylabel_for_symbols_2 */ "\u0968", // U+0969: "३" DEVANAGARI DIGIT THREE - /* 72 */ "\u0969", + /* keylabel_for_symbols_3 */ "\u0969", // U+096A: "४" DEVANAGARI DIGIT FOUR - /* 73 */ "\u096A", + /* keylabel_for_symbols_4 */ "\u096A", // U+096B: "५" DEVANAGARI DIGIT FIVE - /* 74 */ "\u096B", + /* keylabel_for_symbols_5 */ "\u096B", // U+096C: "६" DEVANAGARI DIGIT SIX - /* 75 */ "\u096C", + /* keylabel_for_symbols_6 */ "\u096C", // U+096D: "७" DEVANAGARI DIGIT SEVEN - /* 76 */ "\u096D", + /* keylabel_for_symbols_7 */ "\u096D", // U+096E: "८" DEVANAGARI DIGIT EIGHT - /* 77 */ "\u096E", + /* keylabel_for_symbols_8 */ "\u096E", // U+096F: "९" DEVANAGARI DIGIT NINE - /* 78 */ "\u096F", + /* keylabel_for_symbols_9 */ "\u096F", // U+0966: "०" DEVANAGARI DIGIT ZERO - /* 79 */ "\u0966", + /* keylabel_for_symbols_0 */ "\u0966", // Label for "switch to symbols" key. - /* 80 */ "?\u0967\u0968\u0969", + /* label_to_symbol_key */ "?\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. - /* 81 */ "\u0967\u0968\u0969", - /* 82 */ "1", - /* 83 */ "2", - /* 84 */ "3", - /* 85 */ "4", - /* 86 */ "5", - /* 87 */ "6", - /* 88 */ "7", - /* 89 */ "8", - /* 90 */ "9", - /* 91 */ "0", + /* label_to_symbol_with_microphone_key */ "\u0967\u0968\u0969", + /* additional_more_keys_for_symbols_1 */ "1", + /* additional_more_keys_for_symbols_2 */ "2", + /* additional_more_keys_for_symbols_3 */ "3", + /* additional_more_keys_for_symbols_4 */ "4", + /* additional_more_keys_for_symbols_5 */ "5", + /* additional_more_keys_for_symbols_6 */ "6", + /* additional_more_keys_for_symbols_7 */ "7", + /* additional_more_keys_for_symbols_8 */ "8", + /* additional_more_keys_for_symbols_9 */ "9", + /* additional_more_keys_for_symbols_0 */ "0", }; /* Language hr: Croatian */ private static final String[] LANGUAGE_hr = { - /* 0~ */ + /* more_keys_for_a ~ */ null, null, null, null, null, - /* ~4 */ + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_9qm_rqm", + /* single_quotes */ "!text/single_9qm_rqm", + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + /* more_keys_for_c */ "\u010D,\u0107,\u00E7", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+00DF: "ß" LATIN SMALL LETTER SHARP S - /* 5 */ "\u0161,\u015B,\u00DF", + /* more_keys_for_s */ "\u0161,\u015B,\u00DF", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u00F1,\u0144", - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - /* 7 */ "\u010D,\u0107,\u00E7", - /* 8 */ null, + /* more_keys_for_n */ "\u00F1,\u0144", + /* label_to_alpha_key */ null, + /* more_keys_for_y */ null, // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE - /* 9 */ "\u0111", - /* 10 */ null, - /* 11 */ null, + /* more_keys_for_d */ "\u0111", // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - /* 12 */ "\u017E,\u017A,\u017C", - /* 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, - null, null, null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_rqm", - /* 53 */ "!text/double_9qm_rqm", - /* 54 */ "!text/single_raqm_laqm", - /* 55 */ "!text/double_raqm_laqm", + /* more_keys_for_z */ "\u017E,\u017A,\u017C", + /* more_keys_for_t ~ */ + null, null, null, + /* ~ more_keys_for_g */ + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", }; /* Language hu: Hungarian */ @@ -1707,22 +1798,7 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E1,\u00E0,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // 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+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - /* 2 */ "\u00ED,\u00EE,\u00EF,\u00EC,\u012F,\u012B", + /* more_keys_for_a */ "\u00E1,\u00E0,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE @@ -1732,34 +1808,52 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F3,\u00F6,\u0151,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", + /* more_keys_for_o */ "\u00F3,\u00F6,\u0151,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u00FC,\u0171,\u00FB,\u00F9,\u016B", - /* 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, null, null, null, null, null, null, null, - null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_rqm", - /* 53 */ "!text/double_9qm_rqm", - /* 54 */ "!text/single_raqm_laqm", - /* 55 */ "!text/double_raqm_laqm", + /* more_keys_for_u */ "\u00FA,\u00FC,\u0171,\u00FB,\u00F9,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // 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+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00ED,\u00EE,\u00EF,\u00EC,\u012F,\u012B", + /* double_quotes */ "!text/double_9qm_rqm", + /* single_quotes */ "!text/single_9qm_rqm", + /* more_keys_for_c ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_g */ + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", }; /* Language hy_AM: Armenian (Armenia) */ private static final String[] LANGUAGE_hy_AM = { - /* 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, + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ + // Label for "switch to alphabetic" key. + // U+0531: "Ա" ARMENIAN CAPITAL LETTER AYB + // U+0532: "Բ" ARMENIAN CAPITAL LETTER BEN + // U+0533: "Գ" ARMENIAN CAPITAL LETTER GIM + /* label_to_alpha_key */ "\u0531\u0532\u0533", + /* more_keys_for_y ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~58 */ + null, null, null, null, null, null, null, + /* ~ more_keys_for_cyrillic_soft_sign */ // U+058A: "֊" ARMENIAN HYPHEN // U+055C: "՜" ARMENIAN EXCLAMATION MARK // U+055D: "՝" ARMENIAN COMMA @@ -1768,36 +1862,33 @@ public final class KeyboardTextsTable { // U+055A: "՚" ARMENIAN APOSTROPHE // U+055B: "՛" ARMENIAN EMPHASIS MARK // U+055F: "՟" ARMENIAN ABBREVIATION MARK - /* 59 */ "!fixedColumnOrder!8,!,?,\u0559,\u055A,.,\u055C,\\,,\u055E,:,;,\u055F,\u00AB,\u00BB,\u058A,\u055D,\u055B", - /* 60~ */ + /* more_keys_for_punctuation */ "!fixedColumnOrder!8,!,?,\u0559,\u055A,.,\u055C,\\,,\u055E,:,;,\u055F,\u00AB,\u00BB,\u058A,\u055D,\u055B", + /* more_keys_for_nordic_row2_11 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~103 */ + null, null, null, null, null, null, null, null, + /* ~ keyspec_right_single_angle_quote */ // U+058F: "֏" ARMENIAN DRAM SIGN // TODO: Enable this when we have glyph for the following letter // <string name="keylabel_for_currency">֏</string> // // U+055D: "՝" ARMENIAN COMMA - /* 104 */ "\u055D", - /* 105 */ null, - /* 106 */ null, + /* keylabel_for_tablet_comma */ "\u055D", + /* more_keys_for_tablet_period */ "!text/more_keys_for_punctuation", + // U+055E: "՞" ARMENIAN QUESTION MARK + // U+00BF: "¿" INVERTED QUESTION MARK + /* more_keys_for_question */ "\u055E,\u00BF", + /* more_keys_for_h ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_greater_than */ // U+0589: "։" ARMENIAN FULL STOP - /* 107 */ "\u0589", - /* 108 */ null, - /* 109 */ null, - /* 110 */ "\u0589", - /* 111 */ null, - /* 112 */ "!text/more_keys_for_punctuation", - /* 113~ */ - null, null, null, - /* ~115 */ + /* keylabel_for_period */ "\u0589", + /* keylabel_for_tablet_period */ "\u0589", // U+055C: "՜" ARMENIAN EXCLAMATION MARK // U+00A1: "¡" INVERTED EXCLAMATION MARK - /* 116 */ "\u055C,\u00A1", - // U+055E: "՞" ARMENIAN QUESTION MARK - // U+00BF: "¿" INVERTED QUESTION MARK - /* 117 */ "\u055E,\u00BF", + /* more_keys_for_exclamation */ "\u055C,\u00A1", }; /* Language is: Icelandic */ @@ -1810,22 +1901,7 @@ public final class KeyboardTextsTable { // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E1,\u00E4,\u00E6,\u00E5,\u00E0,\u00E2,\u00E3,\u0101", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u00EB,\u00E8,\u00EA,\u0119,\u0117,\u0113", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - /* 2 */ "\u00ED,\u00EF,\u00EE,\u00EC,\u012F,\u012B", + /* more_keys_for_a */ "\u00E1,\u00E4,\u00E6,\u00E5,\u00E0,\u00E2,\u00E3,\u0101", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -1834,39 +1910,50 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", + /* more_keys_for_o */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // 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+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u00FC,\u00FB,\u00F9,\u016B", - /* 5~ */ - null, null, null, - /* ~7 */ + /* more_keys_for_u */ "\u00FA,\u00FC,\u00FB,\u00F9,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u00EB,\u00E8,\u00EA,\u0119,\u0117,\u0113", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00ED,\u00EF,\u00EE,\u00EC,\u012F,\u012B", + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + /* more_keys_for_c ~ */ + null, null, null, null, + /* ~ label_to_alpha_key */ // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - /* 8 */ "\u00FD,\u00FF", + /* more_keys_for_y */ "\u00FD,\u00FF", // U+00F0: "ð" LATIN SMALL LETTER ETH - /* 9 */ "\u00F0", - /* 10 */ null, + /* more_keys_for_d */ "\u00F0", + /* more_keys_for_z */ null, // U+00FE: "þ" LATIN SMALL LETTER THORN - /* 11 */ "\u00FE", - /* 12~ */ - null, null, null, null, null, null, null, null, - /* ~19 */ + /* more_keys_for_t */ "\u00FE", + /* more_keys_for_l ~ */ + null, null, null, null, null, null, null, + /* ~ more_keys_for_k */ // U+00F0: "ð" LATIN SMALL LETTER ETH - /* 20 */ "\u00F0", + /* keylabel_for_nordic_row1_11 */ "\u00F0", // U+00E6: "æ" LATIN SMALL LETTER AE - /* 21 */ "\u00E6", + /* keylabel_for_nordic_row2_10 */ "\u00E6", // U+00FE: "þ" LATIN SMALL LETTER THORN - /* 22 */ "\u00FE", - /* 23~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", + /* keylabel_for_nordic_row2_11 */ "\u00FE", }; /* Language it: Italian */ @@ -1880,22 +1967,7 @@ public final class KeyboardTextsTable { // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON // U+00AA: "ª" FEMININE ORDINAL INDICATOR - /* 0 */ "\u00E0,\u00E1,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101,\u00AA", - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0119,\u0117,\u0113", - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - /* 2 */ "\u00EC,\u00ED,\u00EE,\u00EF,\u012F,\u012B", + /* more_keys_for_a */ "\u00E0,\u00E1,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101,\u00AA", // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -1905,214 +1977,243 @@ public final class KeyboardTextsTable { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00BA: "º" MASCULINE ORDINAL INDICATOR - /* 3 */ "\u00F2,\u00F3,\u00F4,\u00F6,\u00F5,\u0153,\u00F8,\u014D,\u00BA", + /* more_keys_for_o */ "\u00F2,\u00F3,\u00F4,\u00F6,\u00F5,\u0153,\u00F8,\u014D,\u00BA", // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00F9,\u00FA,\u00FB,\u00FC,\u016B", + /* more_keys_for_u */ "\u00F9,\u00FA,\u00FB,\u00FC,\u016B", + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0119,\u0117,\u0113", + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00EC,\u00ED,\u00EE,\u00EF,\u012F,\u012B", }; /* Language iw: Hebrew */ private static final String[] LANGUAGE_iw = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_rqm_9qm", + /* single_quotes */ "!text/single_rqm_9qm", + /* more_keys_for_c ~ */ + null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+05D0: "א" HEBREW LETTER ALEF // U+05D1: "ב" HEBREW LETTER BET // U+05D2: "ג" HEBREW LETTER GIMEL - /* 51 */ "\u05D0\u05D1\u05D2", - // The following characters don't need BIDI mirroring. - // U+2018: "‘" LEFT SINGLE QUOTATION MARK - // U+2019: "’" RIGHT SINGLE QUOTATION MARK - // U+201A: "‚" SINGLE LOW-9 QUOTATION MARK - // U+201C: "“" LEFT DOUBLE QUOTATION MARK - // U+201D: "”" RIGHT DOUBLE QUOTATION MARK - // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK - /* 52 */ "\u2018,\u2019,\u201A", - /* 53 */ "\u201C,\u201D,\u201E", - /* 54 */ "!text/single_laqm_raqm_rtl", - /* 55 */ "!text/double_laqm_raqm_rtl", - /* 56 */ null, + /* label_to_alpha_key */ "\u05D0\u05D1\u05D2", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, + /* ~ double_angle_quotes */ // U+20AA: "₪" NEW SHEQEL SIGN - /* 57 */ "\u20AA", - /* 58 */ null, - /* 59 */ "!fixedColumnOrder!8,;,/,(|),)|(,#,!,\\,,?,&,\\%,+,\",-,:,',@", - /* 60 */ "!fixedColumnOrder!7,;,/,(|),)|(,#,',\\,,&,\\%,+,\",-,:,@", - /* 61 */ null, + /* keylabel_for_currency */ "\u20AA", + /* more_keys_for_r ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, + /* ~ additional_more_keys_for_symbols_0 */ // U+2605: "★" BLACK STAR - /* 62 */ "\u2605", - /* 63 */ null, - // U+00B1: "±" PLUS-MINUS SIGN - // U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN - /* 64 */ "\u00B1,\uFB29", + /* more_keys_for_star */ "\u2605", // The all letters need to be mirrored are found at // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt - /* 65 */ "!fixedColumnOrder!3,<|>,{|},[|]", - /* 66 */ "!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 - /* 67 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB", - /* 68 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB", + /* keyspec_left_parenthesis */ "(|)", + /* keyspec_right_parenthesis */ ")|(", + /* keyspec_left_square_bracket */ "[|]", + /* keyspec_right_square_bracket */ "]|[", + /* keyspec_left_curly_bracket */ "{|}", + /* keyspec_right_curly_bracket */ "}|{", + /* keyspec_less_than */ "<|>", + /* keyspec_greater_than */ ">|<", + /* keyspec_less_than_equal */ "\u2264|\u2265", + /* keyspec_greater_than_equal */ "\u2265|\u2264", + /* keyspec_left_double_angle_quote */ "\u00AB|\u00BB", + /* keyspec_right_double_angle_quote */ "\u00BB|\u00AB", + /* keyspec_left_single_angle_quote */ "\u2039|\u203A", + /* keyspec_right_single_angle_quote */ "\u203A|\u2039", + /* keylabel_for_tablet_comma ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_tablet_punctuation */ + // U+00B1: "±" PLUS-MINUS SIGN + // U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN + /* more_keys_for_plus */ "\u00B1,\uFB29", }; /* Language ka_GE: Georgian (Georgia) */ private static final String[] LANGUAGE_ka_GE = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + /* more_keys_for_c ~ */ + null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+10D0: "ა" GEORGIAN LETTER AN // U+10D1: "ბ" GEORGIAN LETTER BAN // U+10D2: "გ" GEORGIAN LETTER GAN - /* 51 */ "\u10D0\u10D1\u10D2", - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", + /* label_to_alpha_key */ "\u10D0\u10D1\u10D2", }; /* 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, + /* more_keys_for_a ~ */ null, null, null, null, null, null, null, null, null, null, - /* ~24 */ + /* ~ more_keys_for_n */ + // Label for "switch to alphabetic" key. + // U+0410: "А" CYRILLIC CAPITAL LETTER A + // U+0411: "Б" CYRILLIC CAPITAL LETTER BE + // U+0412: "В" CYRILLIC CAPITAL LETTER VE + /* label_to_alpha_key */ "\u0410\u0411\u0412", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ keylabel_for_nordic_row2_11 */ + // U+0451: "ё" CYRILLIC SMALL LETTER IO + /* more_keys_for_cyrillic_ie */ "\u0451", + /* more_keys_for_nordic_row2_10 */ null, // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA - /* 25 */ "\u0449", + /* keylabel_for_east_slavic_row1_9 */ "\u0449", // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 26 */ "\u044A", + /* keylabel_for_east_slavic_row1_12 */ "\u044A", // U+044B: "ы" CYRILLIC SMALL LETTER YERU - /* 27 */ "\u044B", + /* keylabel_for_east_slavic_row2_1 */ "\u044B", // U+044D: "э" CYRILLIC SMALL LETTER E - /* 28 */ "\u044D", + /* keylabel_for_east_slavic_row2_11 */ "\u044D", // U+0438: "и" CYRILLIC SMALL LETTER I - /* 29 */ "\u0438", + /* keylabel_for_east_slavic_row3_5 */ "\u0438", + // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN + /* more_keys_for_cyrillic_soft_sign */ "\u044A", + /* more_keys_for_punctuation ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_w */ // 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", + /* more_keys_for_cyrillic_u */ "\u04AF,\u04B1", // U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER - /* 32 */ "\u04A3", + /* more_keys_for_cyrillic_en */ "\u04A3", // U+0493: "ғ" CYRILLIC SMALL LETTER GHE WITH STROKE - /* 33 */ "\u0493", + /* more_keys_for_cyrillic_ghe */ "\u0493", // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I - /* 34 */ "\u0456", - // U+04D9: "ә" CYRILLIC SMALL LETTER SCHWA - /* 35 */ "\u04D9", + /* more_keys_for_east_slavic_row2_1 */ "\u0456", // U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O - /* 36 */ "\u04E9", - // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 37 */ "\u044A", + /* more_keys_for_cyrillic_o */ "\u04E9", + /* keylabel_for_south_slavic_row1_6 ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_j */ + // U+049B: "қ" CYRILLIC SMALL LETTER KA WITH DESCENDER + /* more_keys_for_cyrillic_ka */ "\u049B", + // U+04D9: "ә" CYRILLIC SMALL LETTER SCHWA + /* more_keys_for_cyrillic_a */ "\u04D9", // U+04BB: "һ" CYRILLIC SMALL LETTER SHHA - /* 38 */ "\u04BB", - /* 39~ */ - null, null, null, null, - /* ~42 */ - // U+0451: "ё" CYRILLIC SMALL LETTER IO - /* 43 */ "\u0451", - /* 44~ */ - null, null, null, null, null, null, null, - /* ~50 */ - // Label for "switch to alphabetic" key. - // U+0410: "А" CYRILLIC CAPITAL LETTER A - // U+0411: "Б" CYRILLIC CAPITAL LETTER BE - // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 51 */ "\u0410\u0411\u0412", + /* more_keys_for_east_slavic_row2_11 */ "\u04BB", }; /* Language km_KH: Khmer (Cambodia) */ private static final String[] LANGUAGE_km_KH = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+1780: "ក" KHMER LETTER KA // U+1781: "ខ" KHMER LETTER KHA // U+1782: "គ" KHMER LETTER KO - /* 51 */ "\u1780\u1781\u1782", - /* 52~ */ - null, null, null, null, - /* ~55 */ + /* label_to_alpha_key */ "\u1780\u1781\u1782", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_east_slavic_row2_11 */ // U+17DB: "៛" KHMER CURRENCY SYMBOL RIEL - /* 56 */ "\u17DB,\u00A2,\u00A3,\u20AC,\u00A5,\u20B1", + /* more_keys_for_currency_dollar */ "\u17DB,\u00A2,\u00A3,\u20AC,\u00A5,\u20B1", }; /* Language ky: Kirghiz */ private static final String[] LANGUAGE_ky = { - /* 0~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* more_keys_for_a ~ */ null, null, null, null, null, null, null, null, null, null, - /* ~24 */ + /* ~ more_keys_for_n */ + // Label for "switch to alphabetic" key. + // U+0410: "А" CYRILLIC CAPITAL LETTER A + // U+0411: "Б" CYRILLIC CAPITAL LETTER BE + // U+0412: "В" CYRILLIC CAPITAL LETTER VE + /* label_to_alpha_key */ "\u0410\u0411\u0412", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ keylabel_for_nordic_row2_11 */ + // U+0451: "ё" CYRILLIC SMALL LETTER IO + /* more_keys_for_cyrillic_ie */ "\u0451", + /* more_keys_for_nordic_row2_10 */ null, // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA - /* 25 */ "\u0449", + /* keylabel_for_east_slavic_row1_9 */ "\u0449", // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 26 */ "\u044A", + /* keylabel_for_east_slavic_row1_12 */ "\u044A", // U+044B: "ы" CYRILLIC SMALL LETTER YERU - /* 27 */ "\u044B", + /* keylabel_for_east_slavic_row2_1 */ "\u044B", // U+044D: "э" CYRILLIC SMALL LETTER E - /* 28 */ "\u044D", + /* keylabel_for_east_slavic_row2_11 */ "\u044D", // U+0438: "и" CYRILLIC SMALL LETTER I - /* 29 */ "\u0438", + /* keylabel_for_east_slavic_row3_5 */ "\u0438", + // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN + /* more_keys_for_cyrillic_soft_sign */ "\u044A", + /* more_keys_for_punctuation ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_w */ // U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U - /* 30 */ "\u04AF", - /* 31 */ null, + /* more_keys_for_cyrillic_u */ "\u04AF", // U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER - /* 32 */ "\u04A3", - /* 33~ */ - null, null, null, - /* ~35 */ + /* more_keys_for_cyrillic_en */ "\u04A3", + /* more_keys_for_cyrillic_ghe */ null, + /* more_keys_for_east_slavic_row2_1 */ null, // U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O - /* 36 */ "\u04E9", - // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 37 */ "\u044A", - /* 38~ */ - null, null, null, null, null, - /* ~42 */ - // U+0451: "ё" CYRILLIC SMALL LETTER IO - /* 43 */ "\u0451", - /* 44~ */ - null, null, null, null, null, null, null, - /* ~50 */ - // Label for "switch to alphabetic" key. - // U+0410: "А" CYRILLIC CAPITAL LETTER A - // U+0411: "Б" CYRILLIC CAPITAL LETTER BE - // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 51 */ "\u0410\u0411\u0412", + /* more_keys_for_cyrillic_o */ "\u04E9", }; /* Language lo_LA: Lao (Laos) */ private static final String[] LANGUAGE_lo_LA = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+0E81: "ກ" LAO LETTER KO // U+0E82: "ຂ" LAO LETTER KHO SUNG // U+0E84: "ຄ" LAO LETTER KHO TAM - /* 51 */ "\u0E81\u0E82\u0E84", - /* 52~ */ - null, null, null, null, null, - /* ~56 */ + /* label_to_alpha_key */ "\u0E81\u0E82\u0E84", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, + /* ~ double_angle_quotes */ // U+20AD: "₭" KIP SIGN - /* 57 */ "\u20AD", + /* keylabel_for_currency */ "\u20AD", }; /* Language lt: Lithuanian */ @@ -2126,24 +2227,7 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+00E6: "æ" LATIN SMALL LETTER AE - /* 0 */ "\u0105,\u00E4,\u0101,\u00E0,\u00E1,\u00E2,\u00E3,\u00E5,\u00E6", - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+011B: "ě" LATIN SMALL LETTER E WITH CARON - /* 1 */ "\u0117,\u0119,\u0113,\u00E8,\u00E9,\u00EA,\u00EB,\u011B", - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+0131: "ı" LATIN SMALL LETTER DOTLESS I - /* 2 */ "\u012F,\u012B,\u00EC,\u00ED,\u00EE,\u00EF,\u0131", + /* more_keys_for_a */ "\u0105,\u00E4,\u0101,\u00E0,\u00E1,\u00E2,\u00E3,\u00E5,\u00E6", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -2152,7 +2236,7 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - /* 3 */ "\u00F6,\u00F5,\u00F2,\u00F3,\u00F4,\u0153,\u0151,\u00F8", + /* more_keys_for_o */ "\u00F6,\u00F5,\u00F2,\u00F3,\u00F4,\u0153,\u0151,\u00F8", // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS @@ -2162,54 +2246,70 @@ public final class KeyboardTextsTable { // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE - /* 4 */ "\u016B,\u0173,\u00FC,\u016B,\u00F9,\u00FA,\u00FB,\u016F,\u0171", + /* more_keys_for_u */ "\u016B,\u0173,\u00FC,\u016B,\u00F9,\u00FA,\u00FB,\u016F,\u0171", + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+011B: "ě" LATIN SMALL LETTER E WITH CARON + /* more_keys_for_e */ "\u0117,\u0119,\u0113,\u00E8,\u00E9,\u00EA,\u00EB,\u011B", + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + /* more_keys_for_i */ "\u012F,\u012B,\u00EC,\u00ED,\u00EE,\u00EF,\u0131", + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + /* more_keys_for_c */ "\u010D,\u00E7,\u0107", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA - /* 5 */ "\u0161,\u00DF,\u015B,\u015F", + /* more_keys_for_s */ "\u0161,\u00DF,\u015B,\u015F", // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u0146,\u00F1,\u0144,\u0144", - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - /* 7 */ "\u010D,\u00E7,\u0107", + /* more_keys_for_n */ "\u0146,\u00F1,\u0144,\u0144", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - /* 8 */ "\u00FD,\u00FF", + /* more_keys_for_y */ "\u00FD,\u00FF", // U+010F: "ď" LATIN SMALL LETTER D WITH CARON - /* 9 */ "\u010F", - // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA - // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - /* 10 */ "\u0157,\u0159,\u0155", - // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA - // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - /* 11 */ "\u0163,\u0165", + /* more_keys_for_d */ "\u010F", // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE - /* 12 */ "\u017E,\u017C,\u017A", - // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA - /* 13 */ "\u0137", + /* more_keys_for_z */ "\u017E,\u017C,\u017A", + // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA + // U+0165: "ť" LATIN SMALL LETTER T WITH CARON + /* more_keys_for_t */ "\u0163,\u0165", // U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE // U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE // U+013E: "ľ" LATIN SMALL LETTER L WITH CARON - /* 14 */ "\u013C,\u0142,\u013A,\u013E", + /* more_keys_for_l */ "\u013C,\u0142,\u013A,\u013E", // U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", + /* more_keys_for_g */ "\u0123,\u011F", + /* single_angle_quotes ~ */ + null, null, null, + /* ~ keylabel_for_currency */ + // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA + // U+0159: "ř" LATIN SMALL LETTER R WITH CARON + // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE + /* more_keys_for_r */ "\u0157,\u0159,\u0155", + // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA + /* more_keys_for_k */ "\u0137", }; /* Language lv: Latvian */ @@ -2223,24 +2323,7 @@ public final class KeyboardTextsTable { // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+00E6: "æ" LATIN SMALL LETTER AE // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK - /* 0 */ "\u0101,\u00E0,\u00E1,\u00E2,\u00E3,\u00E4,\u00E5,\u00E6,\u0105", - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+011B: "ě" LATIN SMALL LETTER E WITH CARON - /* 1 */ "\u0113,\u0117,\u00E8,\u00E9,\u00EA,\u00EB,\u0119,\u011B", - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+0131: "ı" LATIN SMALL LETTER DOTLESS I - /* 2 */ "\u012B,\u012F,\u00EC,\u00ED,\u00EE,\u00EF,\u0131", + /* more_keys_for_a */ "\u0101,\u00E0,\u00E1,\u00E2,\u00E3,\u00E4,\u00E5,\u00E6,\u0105", // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -2249,7 +2332,7 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - /* 3 */ "\u00F2,\u00F3,\u00F4,\u00F5,\u00F6,\u0153,\u0151,\u00F8", + /* more_keys_for_o */ "\u00F2,\u00F3,\u00F4,\u00F5,\u00F6,\u0153,\u0151,\u00F8", // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE @@ -2258,105 +2341,125 @@ public final class KeyboardTextsTable { // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE - /* 4 */ "\u016B,\u0173,\u00F9,\u00FA,\u00FB,\u00FC,\u016F,\u0171", + /* more_keys_for_u */ "\u016B,\u0173,\u00F9,\u00FA,\u00FB,\u00FC,\u016F,\u0171", + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+011B: "ě" LATIN SMALL LETTER E WITH CARON + /* more_keys_for_e */ "\u0113,\u0117,\u00E8,\u00E9,\u00EA,\u00EB,\u0119,\u011B", + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + /* more_keys_for_i */ "\u012B,\u012F,\u00EC,\u00ED,\u00EE,\u00EF,\u0131", + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + /* more_keys_for_c */ "\u010D,\u00E7,\u0107", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA - /* 5 */ "\u0161,\u00DF,\u015B,\u015F", + /* more_keys_for_s */ "\u0161,\u00DF,\u015B,\u015F", // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u0146,\u00F1,\u0144,\u0144", - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - /* 7 */ "\u010D,\u00E7,\u0107", + /* more_keys_for_n */ "\u0146,\u00F1,\u0144,\u0144", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - /* 8 */ "\u00FD,\u00FF", + /* more_keys_for_y */ "\u00FD,\u00FF", // U+010F: "ď" LATIN SMALL LETTER D WITH CARON - /* 9 */ "\u010F", - // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA - // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - /* 10 */ "\u0157,\u0159,\u0155", - // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA - // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - /* 11 */ "\u0163,\u0165", + /* more_keys_for_d */ "\u010F", // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE - /* 12 */ "\u017E,\u017C,\u017A", - // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA - /* 13 */ "\u0137", + /* more_keys_for_z */ "\u017E,\u017C,\u017A", + // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA + // U+0165: "ť" LATIN SMALL LETTER T WITH CARON + /* more_keys_for_t */ "\u0163,\u0165", // U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE // U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE // U+013E: "ľ" LATIN SMALL LETTER L WITH CARON - /* 14 */ "\u013C,\u0142,\u013A,\u013E", + /* more_keys_for_l */ "\u013C,\u0142,\u013A,\u013E", // U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", + /* more_keys_for_g */ "\u0123,\u011F", + /* single_angle_quotes ~ */ + null, null, null, + /* ~ keylabel_for_currency */ + // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA + // U+0159: "ř" LATIN SMALL LETTER R WITH CARON + // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE + /* more_keys_for_r */ "\u0157,\u0159,\u0155", + // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA + /* more_keys_for_k */ "\u0137", }; /* Language mk: Macedonian */ private static final String[] LANGUAGE_mk = { - /* 0~ */ + /* more_keys_for_a ~ */ + null, null, null, null, null, + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + /* more_keys_for_c ~ */ + null, null, null, + /* ~ more_keys_for_n */ + // Label for "switch to alphabetic" key. + // U+0410: "А" CYRILLIC CAPITAL LETTER A + // U+0411: "Б" CYRILLIC CAPITAL LETTER BE + // U+0412: "В" CYRILLIC CAPITAL LETTER VE + /* label_to_alpha_key */ "\u0410\u0411\u0412", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ keylabel_for_nordic_row2_11 */ + // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE + /* more_keys_for_cyrillic_ie */ "\u0450", + /* more_keys_for_nordic_row2_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, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, - /* ~38 */ + null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_cyrillic_o */ // U+0455: "ѕ" CYRILLIC SMALL LETTER DZE - /* 39 */ "\u0455", + /* keylabel_for_south_slavic_row1_6 */ "\u0455", // U+045C: "ќ" CYRILLIC SMALL LETTER KJE - /* 40 */ "\u045C", + /* keylabel_for_south_slavic_row2_11 */ "\u045C", // U+0437: "з" CYRILLIC SMALL LETTER ZE - /* 41 */ "\u0437", + /* keylabel_for_south_slavic_row3_1 */ "\u0437", // U+0453: "ѓ" CYRILLIC SMALL LETTER GJE - /* 42 */ "\u0453", - // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE - /* 43 */ "\u0450", + /* keylabel_for_south_slavic_row3_8 */ "\u0453", // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE - /* 44 */ "\u045D", - /* 45~ */ - null, null, null, null, null, null, - /* ~50 */ - // Label for "switch to alphabetic" key. - // U+0410: "А" CYRILLIC CAPITAL LETTER A - // U+0411: "Б" CYRILLIC CAPITAL LETTER BE - // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 51 */ "\u0410\u0411\u0412", - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", + /* more_keys_for_cyrillic_i */ "\u045D", }; /* Language mn_MN: Mongolian (Mongolia) */ private static final String[] LANGUAGE_mn_MN = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A // U+0411: "Б" CYRILLIC CAPITAL LETTER BE // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 51 */ "\u0410\u0411\u0412", - /* 52~ */ - null, null, null, null, null, - /* ~56 */ + /* label_to_alpha_key */ "\u0410\u0411\u0412", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, + /* ~ double_angle_quotes */ // U+20AE: "₮" TUGRIK SIGN - /* 57 */ "\u20AE", + /* keylabel_for_currency */ "\u20AE", }; /* Language nb: Norwegian Bokmål */ @@ -2367,16 +2470,7 @@ public final class KeyboardTextsTable { // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E0,\u00E4,\u00E1,\u00E2,\u00E3,\u0101", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", - /* 2 */ null, + /* more_keys_for_a */ "\u00E0,\u00E4,\u00E1,\u00E2,\u00E3,\u0101", // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE @@ -2384,90 +2478,96 @@ public final class KeyboardTextsTable { // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+0153: "œ" LATIN SMALL LIGATURE OE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F4,\u00F2,\u00F3,\u00F6,\u00F5,\u0153,\u014D", + /* more_keys_for_o */ "\u00F4,\u00F2,\u00F3,\u00F6,\u00F5,\u0153,\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", - /* 5~ */ + /* more_keys_for_u */ "\u00FC,\u00FB,\u00F9,\u00FA,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", + /* more_keys_for_i */ null, + /* double_quotes */ "!text/double_9qm_rqm", + /* single_quotes */ "!text/single_9qm_rqm", + /* more_keys_for_c ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~19 */ + /* ~ more_keys_for_k */ // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - /* 20 */ "\u00E5", + /* keylabel_for_nordic_row1_11 */ "\u00E5", // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - /* 21 */ "\u00F8", + /* keylabel_for_nordic_row2_10 */ "\u00F8", // U+00E6: "æ" LATIN SMALL LETTER AE - /* 22 */ "\u00E6", + /* keylabel_for_nordic_row2_11 */ "\u00E6", + /* more_keys_for_cyrillic_ie */ null, // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - /* 23 */ "\u00F6", + /* more_keys_for_nordic_row2_10 */ "\u00F6", + /* keylabel_for_east_slavic_row1_9 ~ */ + null, null, null, null, null, null, null, + /* ~ more_keys_for_punctuation */ // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - /* 24 */ "\u00E4", - /* 25~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_rqm", - /* 53 */ "!text/double_9qm_rqm", + /* more_keys_for_nordic_row2_11 */ "\u00E4", }; /* Language ne_NP: Nepali (Nepal) */ private static final String[] LANGUAGE_ne_NP = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+0915: "क" DEVANAGARI LETTER KA // U+0916: "ख" DEVANAGARI LETTER KHA // U+0917: "ग" DEVANAGARI LETTER GA - /* 51 */ "\u0915\u0916\u0917", - /* 52~ */ - null, null, null, null, null, - /* ~56 */ + /* label_to_alpha_key */ "\u0915\u0916\u0917", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, + /* ~ double_angle_quotes */ // U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN - /* 57 */ "\u0930\u0941.", - /* 58~ */ - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~69 */ + /* keylabel_for_currency */ "\u0930\u0941.", + /* more_keys_for_r ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_nordic_row2_11 */ // U+0967: "१" DEVANAGARI DIGIT ONE - /* 70 */ "\u0967", + /* keylabel_for_symbols_1 */ "\u0967", // U+0968: "२" DEVANAGARI DIGIT TWO - /* 71 */ "\u0968", + /* keylabel_for_symbols_2 */ "\u0968", // U+0969: "३" DEVANAGARI DIGIT THREE - /* 72 */ "\u0969", + /* keylabel_for_symbols_3 */ "\u0969", // U+096A: "४" DEVANAGARI DIGIT FOUR - /* 73 */ "\u096A", + /* keylabel_for_symbols_4 */ "\u096A", // U+096B: "५" DEVANAGARI DIGIT FIVE - /* 74 */ "\u096B", + /* keylabel_for_symbols_5 */ "\u096B", // U+096C: "६" DEVANAGARI DIGIT SIX - /* 75 */ "\u096C", + /* keylabel_for_symbols_6 */ "\u096C", // U+096D: "७" DEVANAGARI DIGIT SEVEN - /* 76 */ "\u096D", + /* keylabel_for_symbols_7 */ "\u096D", // U+096E: "८" DEVANAGARI DIGIT EIGHT - /* 77 */ "\u096E", + /* keylabel_for_symbols_8 */ "\u096E", // U+096F: "९" DEVANAGARI DIGIT NINE - /* 78 */ "\u096F", + /* keylabel_for_symbols_9 */ "\u096F", // U+0966: "०" DEVANAGARI DIGIT ZERO - /* 79 */ "\u0966", + /* keylabel_for_symbols_0 */ "\u0966", // Label for "switch to symbols" key. - /* 80 */ "?\u0967\u0968\u0969", + /* label_to_symbol_key */ "?\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. - /* 81 */ "\u0967\u0968\u0969", - /* 82 */ "1", - /* 83 */ "2", - /* 84 */ "3", - /* 85 */ "4", - /* 86 */ "5", - /* 87 */ "6", - /* 88 */ "7", - /* 89 */ "8", - /* 90 */ "9", - /* 91 */ "0", + /* label_to_symbol_with_microphone_key */ "\u0967\u0968\u0969", + /* additional_more_keys_for_symbols_1 */ "1", + /* additional_more_keys_for_symbols_2 */ "2", + /* additional_more_keys_for_symbols_3 */ "3", + /* additional_more_keys_for_symbols_4 */ "4", + /* additional_more_keys_for_symbols_5 */ "5", + /* additional_more_keys_for_symbols_6 */ "6", + /* additional_more_keys_for_symbols_7 */ "7", + /* additional_more_keys_for_symbols_8 */ "8", + /* additional_more_keys_for_symbols_9 */ "9", + /* additional_more_keys_for_symbols_0 */ "0", }; /* Language nl: Dutch */ @@ -2480,7 +2580,22 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E1,\u00E4,\u00E2,\u00E0,\u00E6,\u00E3,\u00E5,\u0101", + /* more_keys_for_a */ "\u00E1,\u00E4,\u00E2,\u00E0,\u00E6,\u00E3,\u00E5,\u0101", + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + /* more_keys_for_o */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // 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+016B: "ū" LATIN SMALL LETTER U WITH MACRON + /* more_keys_for_u */ "\u00FA,\u00FC,\u00FB,\u00F9,\u016B", // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -2488,7 +2603,7 @@ public final class KeyboardTextsTable { // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u00EB,\u00EA,\u00E8,\u0119,\u0117,\u0113", + /* more_keys_for_e */ "\u00E9,\u00EB,\u00EA,\u00E8,\u0119,\u0117,\u0113", // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE @@ -2496,36 +2611,17 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+0133: "ij" LATIN SMALL LIGATURE IJ - /* 2 */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B,\u0133", - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // 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+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u00FC,\u00FB,\u00F9,\u016B", - /* 5 */ null, + /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B,\u0133", + /* double_quotes */ "!text/double_9qm_rqm", + /* single_quotes */ "!text/single_9qm_rqm", + /* more_keys_for_c */ null, + /* more_keys_for_s */ null, // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u00F1,\u0144", - /* 7 */ null, + /* more_keys_for_n */ "\u00F1,\u0144", + /* label_to_alpha_key */ null, // U+0133: "ij" LATIN SMALL LIGATURE IJ - /* 8 */ "\u0133", - /* 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, null, null, null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_rqm", - /* 53 */ "!text/double_9qm_rqm", + /* more_keys_for_y */ "\u0133", }; /* Language pl: Polish */ @@ -2539,16 +2635,7 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u0105,\u00E1,\u00E0,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u0119,\u00E8,\u00E9,\u00EA,\u00EB,\u0117,\u0113", - /* 2 */ null, + /* more_keys_for_a */ "\u0105,\u00E1,\u00E0,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -2557,36 +2644,40 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", - /* 4 */ null, + /* more_keys_for_o */ "\u00F3,\u00F6,\u00F4,\u00F2,\u00F5,\u0153,\u00F8,\u014D", + /* more_keys_for_u */ null, + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u0119,\u00E8,\u00E9,\u00EA,\u00EB,\u0117,\u0113", + /* more_keys_for_i */ null, + /* double_quotes */ "!text/double_9qm_rqm", + /* single_quotes */ "!text/single_9qm_rqm", + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + /* more_keys_for_c */ "\u0107,\u00E7,\u010D", // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+0161: "š" LATIN SMALL LETTER S WITH CARON - /* 5 */ "\u015B,\u00DF,\u0161", + /* more_keys_for_s */ "\u015B,\u00DF,\u0161", // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - /* 6 */ "\u0144,\u00F1", - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - /* 7 */ "\u0107,\u00E7,\u010D", - /* 8~ */ - null, null, null, null, - /* ~11 */ + /* more_keys_for_n */ "\u0144,\u00F1", + /* label_to_alpha_key ~ */ + null, null, null, + /* ~ more_keys_for_d */ // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON - /* 12 */ "\u017C,\u017A,\u017E", - /* 13 */ null, + /* more_keys_for_z */ "\u017C,\u017A,\u017E", + /* more_keys_for_t */ null, // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE - /* 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, null, null, - null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_rqm", - /* 53 */ "!text/double_9qm_rqm", + /* more_keys_for_l */ "\u0142", }; /* Language pt: Portuguese */ @@ -2599,22 +2690,7 @@ public final class KeyboardTextsTable { // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+00E6: "æ" LATIN SMALL LETTER AE // U+00AA: "ª" FEMININE ORDINAL INDICATOR - /* 0 */ "\u00E1,\u00E3,\u00E0,\u00E2,\u00E4,\u00E5,\u00E6,\u00AA", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - /* 1 */ "\u00E9,\u00EA,\u00E8,\u0119,\u0117,\u0113,\u00EB", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - /* 2 */ "\u00ED,\u00EE,\u00EC,\u00EF,\u012F,\u012B", + /* more_keys_for_a */ "\u00E1,\u00E3,\u00E0,\u00E2,\u00E4,\u00E5,\u00E6,\u00AA", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -2624,26 +2700,39 @@ public final class KeyboardTextsTable { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00BA: "º" MASCULINE ORDINAL INDICATOR - /* 3 */ "\u00F3,\u00F5,\u00F4,\u00F2,\u00F6,\u0153,\u00F8,\u014D,\u00BA", + /* more_keys_for_o */ "\u00F3,\u00F5,\u00F4,\u00F2,\u00F6,\u0153,\u00F8,\u014D,\u00BA", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", - /* 5 */ null, - /* 6 */ null, + /* more_keys_for_u */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + /* more_keys_for_e */ "\u00E9,\u00EA,\u00E8,\u0119,\u0117,\u0113,\u00EB", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00ED,\u00EE,\u00EC,\u00EF,\u012F,\u012B", + /* double_quotes */ null, + /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - /* 7 */ "\u00E7,\u010D,\u0107", + /* more_keys_for_c */ "\u00E7,\u010D,\u0107", }; /* Language rm: Raeto-Romance */ private static final String[] LANGUAGE_rm = { - /* 0~ */ - null, null, null, - /* ~2 */ + /* more_keys_for_a */ null, // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -2651,7 +2740,7 @@ public final class KeyboardTextsTable { // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+0153: "œ" LATIN SMALL LIGATURE OE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - /* 3 */ "\u00F2,\u00F3,\u00F6,\u00F4,\u00F5,\u0153,\u00F8", + /* more_keys_for_o */ "\u00F2,\u00F3,\u00F6,\u00F4,\u00F5,\u0153,\u00F8", }; /* Language ro: Romanian */ @@ -2665,72 +2754,65 @@ public final class KeyboardTextsTable { // U+00E6: "æ" LATIN SMALL LETTER AE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E2,\u00E3,\u0103,\u00E0,\u00E1,\u00E4,\u00E6,\u00E5,\u0101", - /* 1 */ null, + /* more_keys_for_a */ "\u00E2,\u00E3,\u0103,\u00E0,\u00E1,\u00E4,\u00E6,\u00E5,\u0101", + /* more_keys_for_o ~ */ + null, null, null, + /* ~ more_keys_for_e */ // 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 */ "\u00EE,\u00EF,\u00EC,\u00ED,\u012F,\u012B", - /* 3 */ null, - /* 4 */ null, + /* more_keys_for_i */ "\u00EE,\u00EF,\u00EC,\u00ED,\u012F,\u012B", + /* double_quotes */ "!text/double_9qm_rqm", + /* single_quotes */ "!text/single_9qm_rqm", + /* more_keys_for_c */ null, // U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON - /* 5 */ "\u0219,\u00DF,\u015B,\u0161", - /* 6~ */ + /* more_keys_for_s */ "\u0219,\u00DF,\u015B,\u0161", + /* more_keys_for_n ~ */ null, null, null, null, null, - /* ~10 */ + /* ~ more_keys_for_z */ // U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW - /* 11 */ "\u021B", - /* 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, null, null, null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_rqm", - /* 53 */ "!text/double_9qm_rqm", + /* more_keys_for_t */ "\u021B", }; /* Language ru: Russian */ private static final String[] LANGUAGE_ru = { - /* 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 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + /* more_keys_for_c ~ */ + null, null, null, + /* ~ more_keys_for_n */ + // Label for "switch to alphabetic" key. + // U+0410: "А" CYRILLIC CAPITAL LETTER A + // U+0411: "Б" CYRILLIC CAPITAL LETTER BE + // U+0412: "В" CYRILLIC CAPITAL LETTER VE + /* label_to_alpha_key */ "\u0410\u0411\u0412", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ keylabel_for_nordic_row2_11 */ + // U+0451: "ё" CYRILLIC SMALL LETTER IO + /* more_keys_for_cyrillic_ie */ "\u0451", + /* more_keys_for_nordic_row2_10 */ null, // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA - /* 25 */ "\u0449", + /* keylabel_for_east_slavic_row1_9 */ "\u0449", // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 26 */ "\u044A", + /* keylabel_for_east_slavic_row1_12 */ "\u044A", // U+044B: "ы" CYRILLIC SMALL LETTER YERU - /* 27 */ "\u044B", + /* keylabel_for_east_slavic_row2_1 */ "\u044B", // U+044D: "э" CYRILLIC SMALL LETTER E - /* 28 */ "\u044D", + /* keylabel_for_east_slavic_row2_11 */ "\u044D", // U+0438: "и" CYRILLIC SMALL LETTER I - /* 29 */ "\u0438", - /* 30~ */ - null, null, null, null, null, null, null, - /* ~36 */ + /* keylabel_for_east_slavic_row3_5 */ "\u0438", // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 37 */ "\u044A", - /* 38~ */ - null, null, null, null, null, - /* ~42 */ - // U+0451: "ё" CYRILLIC SMALL LETTER IO - /* 43 */ "\u0451", - /* 44~ */ - null, null, null, null, null, null, null, - /* ~50 */ - // Label for "switch to alphabetic" key. - // U+0410: "А" CYRILLIC CAPITAL LETTER A - // U+0411: "Б" CYRILLIC CAPITAL LETTER BE - // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 51 */ "\u0410\u0411\u0412", - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", + /* more_keys_for_cyrillic_soft_sign */ "\u044A", }; /* Language sk: Slovak */ @@ -2744,24 +2826,7 @@ public final class KeyboardTextsTable { // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+00E6: "æ" LATIN SMALL LETTER AE // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK - /* 0 */ "\u00E1,\u00E4,\u0101,\u00E0,\u00E2,\u00E3,\u00E5,\u00E6,\u0105", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+011B: "ě" LATIN SMALL LETTER E WITH CARON - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - /* 1 */ "\u00E9,\u011B,\u0113,\u0117,\u00E8,\u00EA,\u00EB,\u0119", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+0131: "ı" LATIN SMALL LETTER DOTLESS I - /* 2 */ "\u00ED,\u012B,\u012F,\u00EC,\u00EE,\u00EF,\u0131", + /* more_keys_for_a */ "\u00E1,\u00E4,\u0101,\u00E0,\u00E2,\u00E3,\u00E5,\u00E6,\u0105", // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -2770,7 +2835,7 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - /* 3 */ "\u00F4,\u00F3,\u00F6,\u00F2,\u00F5,\u0153,\u0151,\u00F8", + /* more_keys_for_o */ "\u00F4,\u00F3,\u00F6,\u00F2,\u00F5,\u0153,\u0151,\u00F8", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS @@ -2779,95 +2844,131 @@ public final class KeyboardTextsTable { // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE - /* 4 */ "\u00FA,\u016F,\u00FC,\u016B,\u0173,\u00F9,\u00FB,\u0171", + /* more_keys_for_u */ "\u00FA,\u016F,\u00FC,\u016B,\u0173,\u00F9,\u00FB,\u0171", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+011B: "ě" LATIN SMALL LETTER E WITH CARON + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + /* more_keys_for_e */ "\u00E9,\u011B,\u0113,\u0117,\u00E8,\u00EA,\u00EB,\u0119", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + /* more_keys_for_i */ "\u00ED,\u012B,\u012F,\u00EC,\u00EE,\u00EF,\u0131", + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + /* more_keys_for_c */ "\u010D,\u00E7,\u0107", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA - /* 5 */ "\u0161,\u00DF,\u015B,\u015F", + /* more_keys_for_s */ "\u0161,\u00DF,\u015B,\u015F", // U+0148: "ň" LATIN SMALL LETTER N WITH CARON // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u0148,\u0146,\u00F1,\u0144,\u0144", - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - /* 7 */ "\u010D,\u00E7,\u0107", + /* more_keys_for_n */ "\u0148,\u0146,\u00F1,\u0144,\u0144", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - /* 8 */ "\u00FD,\u00FF", + /* more_keys_for_y */ "\u00FD,\u00FF", // U+010F: "ď" LATIN SMALL LETTER D WITH CARON - /* 9 */ "\u010F", - // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA - /* 10 */ "\u0155,\u0159,\u0157", - // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA - /* 11 */ "\u0165,\u0163", + /* more_keys_for_d */ "\u010F", // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE - /* 12 */ "\u017E,\u017C,\u017A", - // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA - /* 13 */ "\u0137", + /* more_keys_for_z */ "\u017E,\u017C,\u017A", + // U+0165: "ť" LATIN SMALL LETTER T WITH CARON + // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA + /* more_keys_for_t */ "\u0165,\u0163", // U+013E: "ľ" LATIN SMALL LETTER L WITH CARON // U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE // U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE - /* 14 */ "\u013E,\u013A,\u013C,\u0142", + /* more_keys_for_l */ "\u013E,\u013A,\u013C,\u0142", // U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", - /* 54 */ "!text/single_raqm_laqm", - /* 55 */ "!text/double_raqm_laqm", + /* more_keys_for_g */ "\u0123,\u011F", + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", + /* keylabel_for_currency */ null, + // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE + // U+0159: "ř" LATIN SMALL LETTER R WITH CARON + // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA + /* more_keys_for_r */ "\u0155,\u0159,\u0157", + // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA + /* more_keys_for_k */ "\u0137", }; /* Language sl: Slovenian */ private static final String[] LANGUAGE_sl = { - /* 0~ */ + /* more_keys_for_a ~ */ null, null, null, null, null, - /* ~4 */ - // U+0161: "š" LATIN SMALL LETTER S WITH CARON - /* 5 */ "\u0161", - /* 6 */ null, + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - /* 7 */ "\u010D,\u0107", - /* 8 */ null, + /* more_keys_for_c */ "\u010D,\u0107", + // U+0161: "š" LATIN SMALL LETTER S WITH CARON + /* more_keys_for_s */ "\u0161", + /* more_keys_for_n ~ */ + null, null, null, + /* ~ more_keys_for_y */ // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE - /* 9 */ "\u0111", - /* 10 */ null, - /* 11 */ null, + /* more_keys_for_d */ "\u0111", // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON - /* 12 */ "\u017E", - /* 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, - null, null, null, null, null, null, null, null, null, - /* ~51 */ - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", - /* 54 */ "!text/single_raqm_laqm", - /* 55 */ "!text/double_raqm_laqm", + /* more_keys_for_z */ "\u017E", + /* more_keys_for_t ~ */ + null, null, null, + /* ~ more_keys_for_g */ + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", }; /* Language sr: Serbian */ private static final String[] LANGUAGE_sr = { - /* 0~ */ + /* more_keys_for_a ~ */ + null, null, null, null, null, + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + /* more_keys_for_c ~ */ + null, null, null, + /* ~ more_keys_for_n */ + // 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 + /* label_to_alpha_key */ "\u0410\u0411\u0412", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, + /* ~ more_keys_for_g */ + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", + /* keylabel_for_currency ~ */ + null, null, null, null, null, null, + /* ~ keylabel_for_nordic_row2_11 */ + // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE + /* more_keys_for_cyrillic_ie */ "\u0450", + /* more_keys_for_nordic_row2_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, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, - /* ~38 */ + null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_cyrillic_o */ // 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 @@ -2887,30 +2988,15 @@ public final class KeyboardTextsTable { // END: More keys definitions for Serbian (Latin) // BEGIN: More keys definitions for Serbian (Cyrillic) // U+0437: "з" CYRILLIC SMALL LETTER ZE - /* 39 */ "\u0437", + /* keylabel_for_south_slavic_row1_6 */ "\u0437", // U+045B: "ћ" CYRILLIC SMALL LETTER TSHE - /* 40 */ "\u045B", + /* keylabel_for_south_slavic_row2_11 */ "\u045B", // U+0455: "ѕ" CYRILLIC SMALL LETTER DZE - /* 41 */ "\u0455", + /* keylabel_for_south_slavic_row3_1 */ "\u0455", // U+0452: "ђ" CYRILLIC SMALL LETTER DJE - /* 42 */ "\u0452", - // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE - /* 43 */ "\u0450", + /* keylabel_for_south_slavic_row3_8 */ "\u0452", // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE - /* 44 */ "\u045D", - /* 45~ */ - null, null, null, null, null, null, - /* ~50 */ - // 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 - /* 51 */ "\u0410\u0411\u0412", - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", - /* 54 */ "!text/single_raqm_laqm", - /* 55 */ "!text/double_raqm_laqm", + /* more_keys_for_cyrillic_i */ "\u045D", }; /* Language sv: Swedish */ @@ -2920,82 +3006,84 @@ public final class KeyboardTextsTable { // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - /* 0 */ "\u00E1,\u00E0,\u00E2,\u0105,\u00E3", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - /* 1 */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0119", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - /* 2 */ "\u00ED,\u00EC,\u00EE,\u00EF", + /* more_keys_for_a */ "\u00E1,\u00E0,\u00E2,\u0105,\u00E3", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* 3 */ "\u00F3,\u00F2,\u00F4,\u00F5,\u014D", + /* more_keys_for_o */ "\u00F3,\u00F2,\u00F4,\u00F5,\u014D", // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FC,\u00FA,\u00F9,\u00FB,\u016B", + /* more_keys_for_u */ "\u00FC,\u00FA,\u00F9,\u00FB,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0119", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + /* more_keys_for_i */ "\u00ED,\u00EC,\u00EE,\u00EF", + /* double_quotes */ null, + /* single_quotes */ 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 + /* more_keys_for_c */ "\u00E7,\u0107,\u010D", // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA // U+00DF: "ß" LATIN SMALL LETTER SHARP S - /* 5 */ "\u015B,\u0161,\u015F,\u00DF", + /* more_keys_for_s */ "\u015B,\u0161,\u015F,\u00DF", // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0148: "ň" LATIN SMALL LETTER N WITH CARON - /* 6 */ "\u0144,\u00F1,\u0148", - // 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", + /* more_keys_for_n */ "\u0144,\u00F1,\u0148", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - /* 8 */ "\u00FD,\u00FF,\u00FC", + /* more_keys_for_y */ "\u00FD,\u00FF,\u00FC", // U+00F0: "ð" LATIN SMALL LETTER ETH // U+010F: "ď" LATIN SMALL LETTER D WITH CARON - /* 9 */ "\u00F0,\u010F", - // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - /* 10 */ "\u0159", - // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - // U+00FE: "þ" LATIN SMALL LETTER THORN - /* 11 */ "\u0165,\u00FE", + /* more_keys_for_d */ "\u00F0,\u010F", // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - /* 12 */ "\u017A,\u017E,\u017C", - /* 13 */ null, + /* more_keys_for_z */ "\u017A,\u017E,\u017C", + // U+0165: "ť" LATIN SMALL LETTER T WITH CARON + // U+00FE: "þ" LATIN SMALL LETTER THORN + /* more_keys_for_t */ "\u0165,\u00FE", // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE - /* 14 */ "\u0142", - /* 15~ */ - null, null, null, null, null, - /* ~19 */ + /* more_keys_for_l */ "\u0142", + /* more_keys_for_g */ null, + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", + /* keylabel_for_currency */ null, + // U+0159: "ř" LATIN SMALL LETTER R WITH CARON + /* more_keys_for_r */ "\u0159", + /* more_keys_for_k */ null, // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - /* 20 */ "\u00E5", + /* keylabel_for_nordic_row1_11 */ "\u00E5", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - /* 21 */ "\u00F6", + /* keylabel_for_nordic_row2_10 */ "\u00F6", // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - /* 22 */ "\u00E4", + /* keylabel_for_nordic_row2_11 */ "\u00E4", + /* more_keys_for_cyrillic_ie */ null, // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+0153: "œ" LATIN SMALL LIGATURE OE - /* 23 */ "\u00F8,\u0153", + /* more_keys_for_nordic_row2_10 */ "\u00F8,\u0153", + /* keylabel_for_east_slavic_row1_9 ~ */ + null, null, null, null, null, null, null, + /* ~ more_keys_for_punctuation */ // U+00E6: "æ" LATIN SMALL LETTER AE - /* 24 */ "\u00E6", - /* 25~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~53 */ - /* 54 */ "!text/single_raqm_laqm", - /* 55 */ "!text/double_raqm_laqm", + /* more_keys_for_nordic_row2_11 */ "\u00E6", }; /* Language sw: Swahili */ @@ -3009,19 +3097,7 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E0,\u00E1,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0113", - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - /* 2 */ "\u00EE,\u00EF,\u00ED,\u012B,\u00EC", + /* more_keys_for_a */ "\u00E0,\u00E1,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -3030,43 +3106,54 @@ public final class KeyboardTextsTable { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - /* 3 */ "\u00F4,\u00F6,\u00F2,\u00F3,\u0153,\u00F8,\u014D,\u00F5", + /* more_keys_for_o */ "\u00F4,\u00F6,\u00F2,\u00F3,\u0153,\u00F8,\u014D,\u00F5", // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // 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 */ "\u00FB,\u00FC,\u00F9,\u00FA,\u016B", + /* more_keys_for_u */ "\u00FB,\u00FC,\u00F9,\u00FA,\u016B", + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0113", + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + /* more_keys_for_i */ "\u00EE,\u00EF,\u00ED,\u012B,\u00EC", + /* double_quotes */ null, + /* single_quotes */ null, + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + /* more_keys_for_c */ "\u00E7", // U+00DF: "ß" LATIN SMALL LETTER SHARP S - /* 5 */ "\u00DF", + /* more_keys_for_s */ "\u00DF", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - /* 6 */ "\u00F1", - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - /* 7 */ "\u00E7", - /* 8~ */ - null, null, null, null, null, null, null, - /* ~14 */ - /* 15 */ "g\'", + /* more_keys_for_n */ "\u00F1", + /* label_to_alpha_key ~ */ + null, null, null, null, null, null, + /* ~ more_keys_for_l */ + /* more_keys_for_g */ "g\'", }; /* Language th: Thai */ private static final String[] LANGUAGE_th = { - /* 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, null, null, null, - null, null, null, null, null, null, - /* ~50 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_n */ // Label for "switch to alphabetic" key. // U+0E01: "ก" THAI CHARACTER KO KAI // U+0E02: "ข" THAI CHARACTER KHO KHAI // U+0E04: "ค" THAI CHARACTER KHO KHWAI - /* 51 */ "\u0E01\u0E02\u0E04", - /* 52~ */ - null, null, null, null, null, - /* ~56 */ + /* label_to_alpha_key */ "\u0E01\u0E02\u0E04", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, + /* ~ double_angle_quotes */ // U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT - /* 57 */ "\u0E3F", + /* keylabel_for_currency */ "\u0E3F", }; /* Language tl: Tagalog */ @@ -3081,22 +3168,7 @@ public final class KeyboardTextsTable { // U+00E6: "æ" LATIN SMALL LETTER AE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON // U+00AA: "ª" FEMININE ORDINAL INDICATOR - /* 0 */ "\u00E1,\u00E0,\u00E4,\u00E2,\u00E3,\u00E5,\u0105,\u00E6,\u0101,\u00AA", - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E9,\u00E8,\u00EB,\u00EA,\u0119,\u0117,\u0113", - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - /* 2 */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", + /* more_keys_for_a */ "\u00E1,\u00E0,\u00E4,\u00E2,\u00E3,\u00E5,\u0105,\u00E6,\u0101,\u00AA", // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -3106,36 +3178,44 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00BA: "º" MASCULINE ORDINAL INDICATOR - /* 3 */ "\u00F3,\u00F2,\u00F6,\u00F4,\u00F5,\u00F8,\u0153,\u014D,\u00BA", + /* more_keys_for_o */ "\u00F3,\u00F2,\u00F6,\u00F4,\u00F5,\u00F8,\u0153,\u014D,\u00BA", // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* 4 */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", - /* 5 */ null, - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* 6 */ "\u00F1,\u0144", + /* more_keys_for_u */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EB,\u00EA,\u0119,\u0117,\u0113", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", + /* double_quotes */ null, + /* single_quotes */ 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", + /* more_keys_for_c */ "\u00E7,\u0107,\u010D", + /* more_keys_for_s */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u00F1,\u0144", }; /* Language tr: Turkish */ private static final String[] LANGUAGE_tr = { // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - /* 0 */ "\u00E2", - /* 1 */ null, - // 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", + /* more_keys_for_a */ "\u00E2", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+0153: "œ" LATIN SMALL LIGATURE OE @@ -3144,72 +3224,85 @@ public final class KeyboardTextsTable { // 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", + /* more_keys_for_o */ "\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", + /* more_keys_for_u */ "\u00FC,\u00FB,\u00F9,\u00FA,\u016B", + /* more_keys_for_e */ null, + // 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 + /* more_keys_for_i */ "\u0131,\u00EE,\u00EF,\u00EC,\u00ED,\u012F,\u012B", + /* double_quotes */ null, + /* single_quotes */ 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 + /* more_keys_for_c */ "\u00E7,\u0107,\u010D", // 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~ */ + /* more_keys_for_s */ "\u015F,\u00DF,\u015B,\u0161", + /* more_keys_for_n ~ */ null, null, null, null, null, null, null, - /* ~14 */ + /* ~ more_keys_for_l */ // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE - /* 15 */ "\u011F", + /* more_keys_for_g */ "\u011F", }; /* Language uk: Ukrainian */ private static final String[] LANGUAGE_uk = { - /* 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 */ + /* more_keys_for_a ~ */ + null, null, null, null, null, + /* ~ more_keys_for_i */ + /* double_quotes */ "!text/double_9qm_lqm", + /* single_quotes */ "!text/single_9qm_lqm", + /* more_keys_for_c ~ */ + null, null, null, + /* ~ more_keys_for_n */ + // Label for "switch to alphabetic" key. + // U+0410: "А" CYRILLIC CAPITAL LETTER A + // U+0411: "Б" CYRILLIC CAPITAL LETTER BE + // U+0412: "В" CYRILLIC CAPITAL LETTER VE + /* label_to_alpha_key */ "\u0410\u0411\u0412", + /* more_keys_for_y ~ */ + null, null, null, null, null, null, null, null, + /* ~ double_angle_quotes */ + // U+20B4: "₴" HRYVNIA SIGN + /* keylabel_for_currency */ "\u20B4", + /* more_keys_for_r ~ */ + null, null, null, null, null, null, null, + /* ~ more_keys_for_nordic_row2_10 */ // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA - /* 25 */ "\u0449", + /* keylabel_for_east_slavic_row1_9 */ "\u0449", // U+0457: "ї" CYRILLIC SMALL LETTER YI - /* 26 */ "\u0457", + /* keylabel_for_east_slavic_row1_12 */ "\u0457", // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I - /* 27 */ "\u0456", + /* keylabel_for_east_slavic_row2_1 */ "\u0456", // U+0454: "є" CYRILLIC SMALL LETTER UKRAINIAN IE - /* 28 */ "\u0454", + /* keylabel_for_east_slavic_row2_11 */ "\u0454", // U+0438: "и" CYRILLIC SMALL LETTER I - /* 29 */ "\u0438", - /* 30~ */ - null, null, null, - /* ~32 */ + /* keylabel_for_east_slavic_row3_5 */ "\u0438", + // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN + /* more_keys_for_cyrillic_soft_sign */ "\u044A", + /* more_keys_for_punctuation ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, + /* ~ more_keys_for_cyrillic_en */ // U+0491: "ґ" CYRILLIC SMALL LETTER GHE WITH UPTURN - /* 33 */ "\u0491", + /* more_keys_for_cyrillic_ghe */ "\u0491", // U+0457: "ї" CYRILLIC SMALL LETTER YI - /* 34 */ "\u0457", - /* 35 */ null, - /* 36 */ null, - // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - /* 37 */ "\u044A", - /* 38~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~50 */ - // Label for "switch to alphabetic" key. - // U+0410: "А" CYRILLIC CAPITAL LETTER A - // U+0411: "Б" CYRILLIC CAPITAL LETTER BE - // U+0412: "В" CYRILLIC CAPITAL LETTER VE - /* 51 */ "\u0410\u0411\u0412", - /* 52 */ "!text/single_9qm_lqm", - /* 53 */ "!text/double_9qm_lqm", - /* 54~ */ - null, null, null, - /* ~56 */ - // U+20B4: "₴" HRYVNIA SIGN - /* 57 */ "\u20B4", + /* more_keys_for_east_slavic_row2_1 */ "\u0457", }; /* Language vi: Vietnamese */ @@ -3231,25 +3324,7 @@ public final class KeyboardTextsTable { // U+1EA9: "ẩ" LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE // U+1EAB: "ẫ" LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE // U+1EAD: "ậ" LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW - /* 0 */ "\u00E0,\u00E1,\u1EA3,\u00E3,\u1EA1,\u0103,\u1EB1,\u1EAF,\u1EB3,\u1EB5,\u1EB7,\u00E2,\u1EA7,\u1EA5,\u1EA9,\u1EAB,\u1EAD", - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+1EBB: "ẻ" LATIN SMALL LETTER E WITH HOOK ABOVE - // U+1EBD: "ẽ" LATIN SMALL LETTER E WITH TILDE - // U+1EB9: "ẹ" LATIN SMALL LETTER E WITH DOT BELOW - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+1EC1: "ề" LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE - // U+1EBF: "ế" LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE - // U+1EC3: "ể" LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE - // U+1EC5: "ễ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE - // U+1EC7: "ệ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW - /* 1 */ "\u00E8,\u00E9,\u1EBB,\u1EBD,\u1EB9,\u00EA,\u1EC1,\u1EBF,\u1EC3,\u1EC5,\u1EC7", - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+1EC9: "ỉ" LATIN SMALL LETTER I WITH HOOK ABOVE - // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE - // U+1ECB: "ị" LATIN SMALL LETTER I WITH DOT BELOW - /* 2 */ "\u00EC,\u00ED,\u1EC9,\u0129,\u1ECB", + /* more_keys_for_a */ "\u00E0,\u00E1,\u1EA3,\u00E3,\u1EA1,\u0103,\u1EB1,\u1EAF,\u1EB3,\u1EB5,\u1EB7,\u00E2,\u1EA7,\u1EA5,\u1EA9,\u1EAB,\u1EAD", // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+1ECF: "ỏ" LATIN SMALL LETTER O WITH HOOK ABOVE @@ -3267,7 +3342,7 @@ public final class KeyboardTextsTable { // U+1EDF: "ở" LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE // U+1EE1: "ỡ" LATIN SMALL LETTER O WITH HORN AND TILDE // U+1EE3: "ợ" LATIN SMALL LETTER O WITH HORN AND DOT BELOW - /* 3 */ "\u00F2,\u00F3,\u1ECF,\u00F5,\u1ECD,\u00F4,\u1ED3,\u1ED1,\u1ED5,\u1ED7,\u1ED9,\u01A1,\u1EDD,\u1EDB,\u1EDF,\u1EE1,\u1EE3", + /* more_keys_for_o */ "\u00F2,\u00F3,\u1ECF,\u00F5,\u1ECD,\u00F4,\u1ED3,\u1ED1,\u1ED5,\u1ED7,\u1ED9,\u01A1,\u1EDD,\u1EDB,\u1EDF,\u1EE1,\u1EE3", // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+1EE7: "ủ" LATIN SMALL LETTER U WITH HOOK ABOVE @@ -3279,26 +3354,41 @@ public final class KeyboardTextsTable { // U+1EED: "ử" LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE // U+1EEF: "ữ" LATIN SMALL LETTER U WITH HORN AND TILDE // U+1EF1: "ự" LATIN SMALL LETTER U WITH HORN AND DOT BELOW - /* 4 */ "\u00F9,\u00FA,\u1EE7,\u0169,\u1EE5,\u01B0,\u1EEB,\u1EE9,\u1EED,\u1EEF,\u1EF1", - /* 5~ */ - null, null, null, - /* ~7 */ + /* more_keys_for_u */ "\u00F9,\u00FA,\u1EE7,\u0169,\u1EE5,\u01B0,\u1EEB,\u1EE9,\u1EED,\u1EEF,\u1EF1", + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+1EBB: "ẻ" LATIN SMALL LETTER E WITH HOOK ABOVE + // U+1EBD: "ẽ" LATIN SMALL LETTER E WITH TILDE + // U+1EB9: "ẹ" LATIN SMALL LETTER E WITH DOT BELOW + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+1EC1: "ề" LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE + // U+1EBF: "ế" LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE + // U+1EC3: "ể" LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE + // U+1EC5: "ễ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE + // U+1EC7: "ệ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW + /* more_keys_for_e */ "\u00E8,\u00E9,\u1EBB,\u1EBD,\u1EB9,\u00EA,\u1EC1,\u1EBF,\u1EC3,\u1EC5,\u1EC7", + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+1EC9: "ỉ" LATIN SMALL LETTER I WITH HOOK ABOVE + // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE + // U+1ECB: "ị" LATIN SMALL LETTER I WITH DOT BELOW + /* more_keys_for_i */ "\u00EC,\u00ED,\u1EC9,\u0129,\u1ECB", + /* double_quotes ~ */ + null, null, null, null, null, null, + /* ~ label_to_alpha_key */ // U+1EF3: "ỳ" LATIN SMALL LETTER Y WITH GRAVE // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+1EF7: "ỷ" LATIN SMALL LETTER Y WITH HOOK ABOVE // U+1EF9: "ỹ" LATIN SMALL LETTER Y WITH TILDE // U+1EF5: "ỵ" LATIN SMALL LETTER Y WITH DOT BELOW - /* 8 */ "\u1EF3,\u00FD,\u1EF7,\u1EF9,\u1EF5", + /* more_keys_for_y */ "\u1EF3,\u00FD,\u1EF7,\u1EF9,\u1EF5", // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE - /* 9 */ "\u0111", - /* 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, null, null, null, null, null, null, null, - null, null, - /* ~56 */ + /* more_keys_for_d */ "\u0111", + /* more_keys_for_z ~ */ + null, null, null, null, null, null, + /* ~ double_angle_quotes */ // U+20AB: "₫" DONG SIGN - /* 57 */ "\u20AB", + /* keylabel_for_currency */ "\u20AB", }; /* Language zu: Zulu */ @@ -3312,19 +3402,7 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* 0 */ "\u00E0,\u00E1,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - /* 1 */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0113", - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - /* 2 */ "\u00EE,\u00EF,\u00ED,\u012B,\u00EC", + /* more_keys_for_a */ "\u00E0,\u00E1,\u00E2,\u00E4,\u00E6,\u00E3,\u00E5,\u0101", // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -3333,19 +3411,33 @@ public final class KeyboardTextsTable { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - /* 3 */ "\u00F4,\u00F6,\u00F2,\u00F3,\u0153,\u00F8,\u014D,\u00F5", + /* more_keys_for_o */ "\u00F4,\u00F6,\u00F2,\u00F3,\u0153,\u00F8,\u014D,\u00F5", // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // 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 */ "\u00FB,\u00FC,\u00F9,\u00FA,\u016B", + /* more_keys_for_u */ "\u00FB,\u00FC,\u00F9,\u00FA,\u016B", + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0113", + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + /* more_keys_for_i */ "\u00EE,\u00EF,\u00ED,\u012B,\u00EC", + /* double_quotes */ null, + /* single_quotes */ null, + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + /* more_keys_for_c */ "\u00E7", // U+00DF: "ß" LATIN SMALL LETTER SHARP S - /* 5 */ "\u00DF", + /* more_keys_for_s */ "\u00DF", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - /* 6 */ "\u00F1", - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - /* 7 */ "\u00E7", + /* more_keys_for_n */ "\u00F1", }; /* Language zz: Alphabet */ @@ -3361,28 +3453,7 @@ public final class KeyboardTextsTable { // U+0103: "ă" LATIN SMALL LETTER A WITH BREVE // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK // U+00AA: "ª" FEMININE ORDINAL INDICATOR - /* 0 */ "\u00E0,\u00E1,\u00E2,\u00E3,\u00E4,\u00E5,\u00E6,\u00E3,\u00E5,\u0101,\u0103,\u0105,\u00AA", - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - // U+0115: "ĕ" LATIN SMALL LETTER E WITH BREVE - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+011B: "ě" LATIN SMALL LETTER E WITH CARON - /* 1 */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0113,\u0115,\u0117,\u0119,\u011B", - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+012D: "ĭ" LATIN SMALL LETTER I WITH BREVE - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+0131: "ı" LATIN SMALL LETTER DOTLESS I - // U+0133: "ij" LATIN SMALL LIGATURE IJ - /* 2 */ "\u00EC,\u00ED,\u00EE,\u00EF,\u0129,\u012B,\u012D,\u012F,\u0131,\u0133", + /* more_keys_for_a */ "\u00E0,\u00E1,\u00E2,\u00E3,\u00E4,\u00E5,\u00E6,\u00E3,\u00E5,\u0101,\u0103,\u0105,\u00AA", // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -3394,7 +3465,7 @@ public final class KeyboardTextsTable { // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+0153: "œ" LATIN SMALL LIGATURE OE // U+00BA: "º" MASCULINE ORDINAL INDICATOR - /* 3 */ "\u00F2,\u00F3,\u00F4,\u00F5,\u00F6,\u00F8,\u014D,\u014F,\u0151,\u0153,\u00BA", + /* more_keys_for_o */ "\u00F2,\u00F3,\u00F4,\u00F5,\u00F6,\u00F8,\u014D,\u014F,\u0151,\u0153,\u00BA", // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX @@ -3405,130 +3476,167 @@ public final class KeyboardTextsTable { // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK - /* 4 */ "\u00F9,\u00FA,\u00FB,\u00FC,\u0169,\u016B,\u016D,\u016F,\u0171,\u0173", + /* more_keys_for_u */ "\u00F9,\u00FA,\u00FB,\u00FC,\u0169,\u016B,\u016D,\u016F,\u0171,\u0173", + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + // U+0115: "ĕ" LATIN SMALL LETTER E WITH BREVE + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+011B: "ě" LATIN SMALL LETTER E WITH CARON + /* more_keys_for_e */ "\u00E8,\u00E9,\u00EA,\u00EB,\u0113,\u0115,\u0117,\u0119,\u011B", + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+012D: "ĭ" LATIN SMALL LETTER I WITH BREVE + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + // U+0133: "ij" LATIN SMALL LIGATURE IJ + /* more_keys_for_i */ "\u00EC,\u00ED,\u00EE,\u00EF,\u0129,\u012B,\u012D,\u012F,\u0131,\u0133", + /* double_quotes */ null, + /* single_quotes */ null, + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX + // U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + /* more_keys_for_c */ "\u00E7,\u0107,\u0109,\u010B,\u010D", // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+017F: "ſ" LATIN SMALL LETTER LONG S - /* 5 */ "\u00DF,\u015B,\u015D,\u015F,\u0161,\u017F", + /* more_keys_for_s */ "\u00DF,\u015B,\u015D,\u015F,\u0161,\u017F", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA // U+0148: "ň" LATIN SMALL LETTER N WITH CARON // U+0149: "ʼn" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE // U+014B: "ŋ" LATIN SMALL LETTER ENG - /* 6 */ "\u00F1,\u0144,\u0146,\u0148,\u0149,\u014B", - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX - // U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - /* 7 */ "\u00E7,\u0107,\u0109,\u010B,\u010D", + /* more_keys_for_n */ "\u00F1,\u0144,\u0146,\u0148,\u0149,\u014B", + /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS // U+0133: "ij" LATIN SMALL LIGATURE IJ - /* 8 */ "\u00FD,\u0177,\u00FF,\u0133", + /* more_keys_for_y */ "\u00FD,\u0177,\u00FF,\u0133", // U+010F: "ď" LATIN SMALL LETTER D WITH CARON // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE // U+00F0: "ð" LATIN SMALL LETTER ETH - /* 9 */ "\u010F,\u0111,\u00F0", - // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA - // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - /* 10 */ "\u0155,\u0157,\u0159", + /* more_keys_for_d */ "\u010F,\u0111,\u00F0", + // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE + // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE + // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON + /* more_keys_for_z */ "\u017A,\u017C,\u017E", // U+00FE: "þ" LATIN SMALL LETTER THORN // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA // U+0165: "ť" LATIN SMALL LETTER T WITH CARON // U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE - /* 11 */ "\u00FE,\u0163,\u0165,\u0167", - // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE - // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON - /* 12 */ "\u017A,\u017C,\u017E", - // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA - // U+0138: "ĸ" LATIN SMALL LETTER KRA - /* 13 */ "\u0137,\u0138", + /* more_keys_for_t */ "\u00FE,\u0163,\u0165,\u0167", // U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE // U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA // U+013E: "ľ" LATIN SMALL LETTER L WITH CARON // U+0140: "ŀ" LATIN SMALL LETTER L WITH MIDDLE DOT // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE - /* 14 */ "\u013A,\u013C,\u013E,\u0140,\u0142", + /* more_keys_for_l */ "\u013A,\u013C,\u013E,\u0140,\u0142", // U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE // U+0121: "ġ" LATIN SMALL LETTER G WITH DOT ABOVE // U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA - /* 15 */ "\u011D,\u011F,\u0121,\u0123", - /* 16 */ null, + /* more_keys_for_g */ "\u011D,\u011F,\u0121,\u0123", + /* single_angle_quotes ~ */ + null, null, null, + /* ~ keylabel_for_currency */ + // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE + // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA + // U+0159: "ř" LATIN SMALL LETTER R WITH CARON + /* more_keys_for_r */ "\u0155,\u0157,\u0159", + // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA + // U+0138: "ĸ" LATIN SMALL LETTER KRA + /* more_keys_for_k */ "\u0137,\u0138", + /* keylabel_for_nordic_row1_11 ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + /* ~ more_keys_for_question */ // U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX - /* 17 */ "\u0125", - // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX - /* 18 */ "\u0135", + /* more_keys_for_h */ "\u0125", // U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX - /* 19 */ "\u0175", + /* more_keys_for_w */ "\u0175", + /* more_keys_for_cyrillic_u ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, + /* ~ more_keys_for_v */ + // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX + /* more_keys_for_j */ "\u0135", }; // TODO: Use the language + "_" + region representation for the locale string key. // Currently we are dropping the region from the key. private static final Object[] LANGUAGES_AND_TEXTS = { // "locale", TEXT_ARRAY, /* numberOfNonNullText/lengthOf_TEXT_ARRAY localeName */ - "DEFAULT", LANGUAGE_DEFAULT, /* 156/156 default */ - "af", LANGUAGE_af, /* 8/ 9 Afrikaans */ - "ar", LANGUAGE_ar, /* 48/120 Arabic */ - "az", LANGUAGE_az_AZ, /* 8/ 16 Azerbaijani (Azerbaijan) */ - "be", LANGUAGE_be_BY, /* 10/ 54 Belarusian (Belarus) */ - "bg", LANGUAGE_bg, /* 2/ 54 Bulgarian */ - "ca", LANGUAGE_ca, /* 11/ 62 Catalan */ - "cs", LANGUAGE_cs, /* 17/ 56 Czech */ - "da", LANGUAGE_da, /* 19/ 56 Danish */ - "de", LANGUAGE_de, /* 16/ 56 German */ - "el", LANGUAGE_el, /* 1/ 52 Greek */ - "en", LANGUAGE_en, /* 8/ 8 English */ - "eo", LANGUAGE_eo, /* 26/126 Esperanto */ - "es", LANGUAGE_es, /* 8/ 60 Spanish */ - "et", LANGUAGE_et_EE, /* 22/ 54 Estonian (Estonia) */ - "fa", LANGUAGE_fa, /* 49/120 Persian */ - "fi", LANGUAGE_fi, /* 10/ 25 Finnish */ - "fr", LANGUAGE_fr, /* 13/ 51 French */ - "hi", LANGUAGE_hi, /* 24/ 92 Hindi */ - "hr", LANGUAGE_hr, /* 9/ 56 Croatian */ - "hu", LANGUAGE_hu, /* 9/ 56 Hungarian */ - "hy", LANGUAGE_hy_AM, /* 7/118 Armenian (Armenia) */ - "is", LANGUAGE_is, /* 13/ 54 Icelandic */ + "DEFAULT", LANGUAGE_DEFAULT, /* 171/171 default */ + "af", LANGUAGE_af, /* 8/ 12 Afrikaans */ + "ar", LANGUAGE_ar, /* 58/110 Arabic */ + "az", LANGUAGE_az_AZ, /* 8/ 17 Azerbaijani (Azerbaijan) */ + "be", LANGUAGE_be_BY, /* 10/ 33 Belarusian (Belarus) */ + "bg", LANGUAGE_bg, /* 2/ 11 Bulgarian */ + "ca", LANGUAGE_ca, /* 11/117 Catalan */ + "cs", LANGUAGE_cs, /* 17/ 21 Czech */ + "da", LANGUAGE_da, /* 19/ 35 Danish */ + "de", LANGUAGE_de, /* 16/ 93 German */ + "el", LANGUAGE_el, /* 1/ 11 Greek */ + "en", LANGUAGE_en, /* 8/ 10 English */ + "eo", LANGUAGE_eo, /* 26/129 Esperanto */ + "es", LANGUAGE_es, /* 8/ 34 Spanish */ + "et", LANGUAGE_et_EE, /* 22/ 27 Estonian (Estonia) */ + "fa", LANGUAGE_fa, /* 61/120 Persian */ + "fi", LANGUAGE_fi, /* 10/ 35 Finnish */ + "fr", LANGUAGE_fr, /* 13/ 93 French */ + "hi", LANGUAGE_hi, /* 24/ 57 Hindi */ + "hr", LANGUAGE_hr, /* 9/ 19 Croatian */ + "hu", LANGUAGE_hu, /* 9/ 19 Hungarian */ + "hy", LANGUAGE_hy_AM, /* 8/123 Armenian (Armenia) */ + "is", LANGUAGE_is, /* 13/ 25 Icelandic */ "it", LANGUAGE_it, /* 5/ 5 Italian */ - "iw", LANGUAGE_iw, /* 14/ 69 Hebrew */ - "ka", LANGUAGE_ka_GE, /* 3/ 54 Georgian (Georgia) */ - "kk", LANGUAGE_kk, /* 16/ 52 Kazakh */ - "km", LANGUAGE_km_KH, /* 2/ 57 Khmer (Cambodia) */ - "ky", LANGUAGE_ky, /* 11/ 52 Kirghiz */ - "lo", LANGUAGE_lo_LA, /* 2/ 58 Lao (Laos) */ - "lt", LANGUAGE_lt, /* 18/ 54 Lithuanian */ - "lv", LANGUAGE_lv, /* 18/ 54 Latvian */ - "mk", LANGUAGE_mk, /* 9/ 54 Macedonian */ - "mn", LANGUAGE_mn_MN, /* 2/ 58 Mongolian (Mongolia) */ - "nb", LANGUAGE_nb, /* 11/ 54 Norwegian Bokmål */ - "ne", LANGUAGE_ne_NP, /* 24/ 92 Nepali (Nepal) */ - "nl", LANGUAGE_nl, /* 9/ 54 Dutch */ - "pl", LANGUAGE_pl, /* 10/ 54 Polish */ + "iw", LANGUAGE_iw, /* 20/118 Hebrew */ + "ka", LANGUAGE_ka_GE, /* 3/ 11 Georgian (Georgia) */ + "kk", LANGUAGE_kk, /* 16/115 Kazakh */ + "km", LANGUAGE_km_KH, /* 2/116 Khmer (Cambodia) */ + "ky", LANGUAGE_ky, /* 11/ 82 Kirghiz */ + "lo", LANGUAGE_lo_LA, /* 2/ 20 Lao (Laos) */ + "lt", LANGUAGE_lt, /* 18/ 22 Lithuanian */ + "lv", LANGUAGE_lv, /* 18/ 22 Latvian */ + "mk", LANGUAGE_mk, /* 9/ 87 Macedonian */ + "mn", LANGUAGE_mn_MN, /* 2/ 20 Mongolian (Mongolia) */ + "nb", LANGUAGE_nb, /* 11/ 35 Norwegian Bokmål */ + "ne", LANGUAGE_ne_NP, /* 24/ 57 Nepali (Nepal) */ + "nl", LANGUAGE_nl, /* 9/ 12 Dutch */ + "pl", LANGUAGE_pl, /* 10/ 16 Polish */ "pt", LANGUAGE_pt, /* 6/ 8 Portuguese */ - "rm", LANGUAGE_rm, /* 1/ 4 Raeto-Romance */ - "ro", LANGUAGE_ro, /* 6/ 54 Romanian */ - "ru", LANGUAGE_ru, /* 10/ 54 Russian */ - "sk", LANGUAGE_sk, /* 20/ 56 Slovak */ - "sl", LANGUAGE_sl, /* 8/ 56 Slovenian */ - "sr", LANGUAGE_sr, /* 11/ 56 Serbian */ - "sv", LANGUAGE_sv, /* 21/ 56 Swedish */ - "sw", LANGUAGE_sw, /* 9/ 16 Swahili */ - "th", LANGUAGE_th, /* 2/ 58 Thai */ - "tl", LANGUAGE_tl, /* 7/ 8 Tagalog */ - "tr", LANGUAGE_tr, /* 7/ 16 Turkish */ - "uk", LANGUAGE_uk, /* 12/ 58 Ukrainian */ - "vi", LANGUAGE_vi, /* 8/ 58 Vietnamese */ - "zu", LANGUAGE_zu, /* 8/ 8 Zulu */ - "zz", LANGUAGE_zz, /* 19/ 20 Alphabet */ + "rm", LANGUAGE_rm, /* 1/ 2 Raeto-Romance */ + "ro", LANGUAGE_ro, /* 6/ 15 Romanian */ + "ru", LANGUAGE_ru, /* 10/ 33 Russian */ + "sk", LANGUAGE_sk, /* 20/ 22 Slovak */ + "sl", LANGUAGE_sl, /* 8/ 19 Slovenian */ + "sr", LANGUAGE_sr, /* 11/ 87 Serbian */ + "sv", LANGUAGE_sv, /* 21/ 35 Swedish */ + "sw", LANGUAGE_sw, /* 9/ 17 Swahili */ + "th", LANGUAGE_th, /* 2/ 20 Thai */ + "tl", LANGUAGE_tl, /* 7/ 10 Tagalog */ + "tr", LANGUAGE_tr, /* 7/ 17 Turkish */ + "uk", LANGUAGE_uk, /* 12/ 81 Ukrainian */ + "vi", LANGUAGE_vi, /* 8/ 20 Vietnamese */ + "zu", LANGUAGE_zu, /* 8/ 10 Zulu */ + "zz", LANGUAGE_zz, /* 19/112 Alphabet */ }; static { @@ -3538,8 +3646,9 @@ public final class KeyboardTextsTable { for (int i = 0; i < LANGUAGES_AND_TEXTS.length; i += 2) { final String language = (String)LANGUAGES_AND_TEXTS[i]; - final String[] texts = (String[])LANGUAGES_AND_TEXTS[i + 1]; - sLanguageToTextsMap.put(language, texts); + final String[] textsTable = (String[])LANGUAGES_AND_TEXTS[i + 1]; + sLanguageToTextsTableMap.put(language, textsTable); + sTextsTableToLanguageMap.put(textsTable, language); } } } diff --git a/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java b/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java index 319bf8921..56ef4767f 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java +++ b/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java @@ -46,15 +46,14 @@ public final class MoreKeySpec { public final String mOutputText; public final int mIconId; - public MoreKeySpec(final String moreKeySpec, boolean needsToUpperCase, final Locale locale, - final KeyboardCodesSet codesSet) { + public MoreKeySpec(final String moreKeySpec, boolean needsToUpperCase, final Locale locale) { if (TextUtils.isEmpty(moreKeySpec)) { throw new KeySpecParser.KeySpecParserError("Empty more key spec"); } mLabel = StringUtils.toUpperCaseOfStringForLocale( KeySpecParser.getLabel(moreKeySpec), needsToUpperCase, locale); final int code = StringUtils.toUpperCaseOfCodeForLocale( - KeySpecParser.getCode(moreKeySpec, codesSet), needsToUpperCase, locale); + KeySpecParser.getCode(moreKeySpec), needsToUpperCase, locale); if (code == Constants.CODE_UNSPECIFIED) { // Some letter, for example German Eszett (U+00DF: "ß"), has multiple characters // upper case representation ("SS"). diff --git a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java index a787ef153..d626ff926 100644 --- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java @@ -29,7 +29,6 @@ import android.provider.ContactsContract.Contacts; import android.text.TextUtils; import android.util.Log; -import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.latin.personalization.AccountUtils; import com.android.inputmethod.latin.utils.StringUtils; @@ -73,8 +72,13 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary { private final boolean mUseFirstLastBigrams; public ContactsBinaryDictionary(final Context context, final Locale locale) { - super(context, getDictNameWithLocale(NAME, locale), locale, - Dictionary.TYPE_CONTACTS, false /* isUpdatable */); + this(context, locale, null /* dictFile */); + } + + public ContactsBinaryDictionary(final Context context, final Locale locale, + final File dictFile) { + super(context, getDictName(NAME, locale, dictFile), locale, Dictionary.TYPE_CONTACTS, + false /* isUpdatable */, dictFile); mLocale = locale; mUseFirstLastBigrams = useFirstLastBigramsForLocale(locale); registerObserver(context); @@ -84,12 +88,6 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary { loadDictionary(); } - // Dummy constructor for tests. - @UsedForTesting - public ContactsBinaryDictionary(final Context context, final Locale locale, final File file) { - this(context, locale); - } - private synchronized void registerObserver(final Context context) { // Perform a managed query. The Activity will handle closing and requerying the cursor // when needed. diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java index c2451ce8d..3b9be4395 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java @@ -122,7 +122,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { new DictionaryUpdateController(); /* A extension for a binary dictionary file. */ - public static final String DICT_FILE_EXTENSION = ".dict"; + protected static final String DICT_FILE_EXTENSION = ".dict"; private final AtomicReference<Runnable> mUnfinishedFlushingTask = new AtomicReference<Runnable>(); @@ -148,10 +148,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { return mBinaryDictionary.isValidDictionary(); } - private File getDictFile() { - return mDictFile; - } - /** * Gets the dictionary update controller for the given dictionary name. */ @@ -213,15 +209,10 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { * @param dictType the dictionary type, as a human-readable string * @param isUpdatable whether to support dynamically updating the dictionary. Please note that * dynamic dictionary has negative effects on memory space and computation time. + * @param dictFile dictionary file path. if null, use default dictionary path based on + * dictionary type. */ public ExpandableBinaryDictionary(final Context context, final String dictName, - final Locale locale, final String dictType, final boolean isUpdatable) { - this(context, dictName, locale, dictType, isUpdatable, - new File(context.getFilesDir(), dictName + DICT_FILE_EXTENSION)); - } - - // Creates an instance that uses a given dictionary file. - public ExpandableBinaryDictionary(final Context context, final String dictName, final Locale locale, final String dictType, final boolean isUpdatable, final File dictFile) { super(dictType); @@ -229,15 +220,22 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { mContext = context; mLocale = locale; mIsUpdatable = isUpdatable; - mDictFile = dictFile; + mDictFile = getDictFile(context, dictName, dictFile); mBinaryDictionary = null; mDictNameDictionaryUpdateController = getDictionaryUpdateController(dictName); // Currently, only dynamic personalization dictionary is updatable. mDictionaryWriter = getDictionaryWriter(isUpdatable); } - protected static String getDictNameWithLocale(final String name, final Locale locale) { - return name + "." + locale.toString(); + public static File getDictFile(final Context context, final String dictName, + final File dictFile) { + return (dictFile != null) ? dictFile + : new File(context.getFilesDir(), dictName + DICT_FILE_EXTENSION); + } + + public static String getDictName(final String name, final Locale locale, + final File dictFile) { + return dictFile != null ? dictFile.getName() : name + "." + locale.toString(); } /** @@ -279,6 +277,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { } protected void clear() { + final File dictFile = mDictFile; getExecutor(mDictName).execute(new Runnable() { @Override public void run() { @@ -286,14 +285,13 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { if (mBinaryDictionary != null) { mBinaryDictionary.close(); } - final File file = getDictFile(); - if (file.exists() && !FileUtils.deleteRecursively(file)) { - Log.e(TAG, "Can't remove a file: " + file.getName()); + if (dictFile.exists() && !FileUtils.deleteRecursively(dictFile)) { + Log.e(TAG, "Can't remove a file: " + dictFile.getName()); } - BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(), + BinaryDictionary.createEmptyDictFile(dictFile.getAbsolutePath(), DICTIONARY_FORMAT_VERSION, mLocale, getHeaderAttributeMap()); mBinaryDictionary = new BinaryDictionary( - file.getAbsolutePath(), 0 /* offset */, file.length(), + dictFile.getAbsolutePath(), 0 /* offset */, dictFile.length(), true /* useFullEditDistance */, mLocale, mDictType, mIsUpdatable); } else { mDictionaryWriter.clear(); @@ -544,9 +542,8 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { } } - final File file = getDictFile(); - final String filename = file.getAbsolutePath(); - final long length = file.length(); + final String filename = mDictFile.getAbsolutePath(); + final long length = mDictFile.length(); // Build the new binary dictionary final BinaryDictionary newBinaryDictionary = new BinaryDictionary(filename, 0 /* offset */, @@ -585,17 +582,16 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { if (needsToReloadBeforeWriting()) { mDictionaryWriter.clear(); loadDictionaryAsync(); - mDictionaryWriter.write(getDictFile(), getHeaderAttributeMap()); + mDictionaryWriter.write(mDictFile, getHeaderAttributeMap()); } else { if (mBinaryDictionary == null || !isValidDictionary() // TODO: remove the check below || !matchesExpectedBinaryDictFormatVersionForThisType( mBinaryDictionary.getFormatVersion())) { - final File file = getDictFile(); - if (file.exists() && !FileUtils.deleteRecursively(file)) { - Log.e(TAG, "Can't remove a file: " + file.getName()); + if (mDictFile.exists() && !FileUtils.deleteRecursively(mDictFile)) { + Log.e(TAG, "Can't remove a file: " + mDictFile.getName()); } - BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(), + BinaryDictionary.createEmptyDictFile(mDictFile.getAbsolutePath(), DICTIONARY_FORMAT_VERSION, mLocale, getHeaderAttributeMap()); } else { if (mBinaryDictionary.needsToRunGC(false /* mindsBlockByGC */)) { @@ -719,7 +715,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { // TODO: cache the file's existence so that we avoid doing a disk access each time. private boolean dictionaryFileExists() { - return getDictFile().exists(); + return mDictFile.exists(); } /** diff --git a/java/src/com/android/inputmethod/latin/InputAttributes.java b/java/src/com/android/inputmethod/latin/InputAttributes.java index b01bc4ba5..01c17f2f2 100644 --- a/java/src/com/android/inputmethod/latin/InputAttributes.java +++ b/java/src/com/android/inputmethod/latin/InputAttributes.java @@ -31,6 +31,7 @@ public final class InputAttributes { final public String mTargetApplicationPackageName; final public boolean mInputTypeNoAutoCorrect; + final public boolean mIsPasswordField; final public boolean mIsSettingsSuggestionStripOn; final public boolean mApplicationSpecifiedCompletionOn; final public boolean mShouldInsertSpacesAutomatically; @@ -56,6 +57,7 @@ public final class InputAttributes { Log.w(TAG, String.format("Unexpected input class: inputType=0x%08x" + " imeOptions=0x%08x", inputType, editorInfo.imeOptions)); } + mIsPasswordField = false; mIsSettingsSuggestionStripOn = false; mInputTypeNoAutoCorrect = false; mApplicationSpecifiedCompletionOn = false; @@ -71,10 +73,11 @@ public final class InputAttributes { final boolean flagAutoComplete = 0 != (inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE); + mIsPasswordField = InputTypeUtils.isPasswordInputType(inputType) + || InputTypeUtils.isVisiblePasswordInputType(inputType); // TODO: Have a helper method in InputTypeUtils // Make sure that passwords are not displayed in {@link SuggestionStripView}. - if (InputTypeUtils.isPasswordInputType(inputType) - || InputTypeUtils.isVisiblePasswordInputType(inputType) + if (mIsPasswordField || InputTypeUtils.isEmailVariation(variation) || InputType.TYPE_TEXT_VARIATION_URI == variation || InputType.TYPE_TEXT_VARIATION_FILTER == variation diff --git a/java/src/com/android/inputmethod/latin/InputView.java b/java/src/com/android/inputmethod/latin/InputView.java index 76b0912f6..ea7859e60 100644 --- a/java/src/com/android/inputmethod/latin/InputView.java +++ b/java/src/com/android/inputmethod/latin/InputView.java @@ -31,6 +31,7 @@ public final class InputView extends LinearLayout { private final Rect mInputViewRect = new Rect(); private KeyboardTopPaddingForwarder mKeyboardTopPaddingForwarder; private MoreSuggestionsViewCanceler mMoreSuggestionsViewCanceler; + private MotionEventForwarder<?, ?> mActiveForwarder; public InputView(final Context context, final AttributeSet attrs) { super(context, attrs, 0); @@ -53,42 +54,62 @@ public final class InputView extends LinearLayout { } @Override - public boolean dispatchTouchEvent(final MotionEvent me) { + public boolean onInterceptTouchEvent(final MotionEvent me) { final Rect rect = mInputViewRect; getGlobalVisibleRect(rect); - final int x = (int)me.getX() + rect.left; - final int y = (int)me.getY() + rect.top; - - // The touch events that hit the top padding of keyboard should be - // forwarded to {@link SuggestionStripView}. - if (mKeyboardTopPaddingForwarder.dispatchTouchEvent(x, y, me)) { + final int index = me.getActionIndex(); + final int x = (int)me.getX(index) + rect.left; + final int y = (int)me.getY(index) + rect.top; + + // The touch events that hit the top padding of keyboard should be forwarded to + // {@link SuggestionStripView}. + if (mKeyboardTopPaddingForwarder.onInterceptTouchEvent(x, y, me)) { + mActiveForwarder = mKeyboardTopPaddingForwarder; return true; } + // To cancel {@link MoreSuggestionsView}, we should intercept a touch event to // {@link MainKeyboardView} and dismiss the {@link MoreSuggestionsView}. - if (mMoreSuggestionsViewCanceler.dispatchTouchEvent(x, y, me)) { + if (mMoreSuggestionsViewCanceler.onInterceptTouchEvent(x, y, me)) { + mActiveForwarder = mMoreSuggestionsViewCanceler; return true; } - return super.dispatchTouchEvent(me); + + mActiveForwarder = null; + return false; + } + + @Override + public boolean onTouchEvent(final MotionEvent me) { + if (mActiveForwarder == null) { + return super.onTouchEvent(me); + } + + final Rect rect = mInputViewRect; + getGlobalVisibleRect(rect); + final int index = me.getActionIndex(); + final int x = (int)me.getX(index) + rect.left; + final int y = (int)me.getY(index) + rect.top; + return mActiveForwarder.onTouchEvent(x, y, me); } /** - * This class forwards series of {@link MotionEvent}s from <code>Forwarder</code> view to - * <code>Receiver</code> view. + * This class forwards series of {@link MotionEvent}s from <code>SenderView</code> to + * <code>ReceiverView</code>. * - * @param <Sender> a {@link View} that may send a {@link MotionEvent} to <Receiver>. - * @param <Receiver> a {@link View} that receives forwarded {@link MotionEvent} from - * <Forwarder>. + * @param <SenderView> a {@link View} that may send a {@link MotionEvent} to <ReceiverView>. + * @param <ReceiverView> a {@link View} that receives forwarded {@link MotionEvent} from + * <SenderView>. */ - private static abstract class MotionEventForwarder<Sender extends View, Receiver extends View> { - protected final Sender mSenderView; - protected final Receiver mReceiverView; + private static abstract class + MotionEventForwarder<SenderView extends View, ReceiverView extends View> { + protected final SenderView mSenderView; + protected final ReceiverView mReceiverView; - private boolean mIsForwardingEvent; protected final Rect mEventSendingRect = new Rect(); protected final Rect mEventReceivingRect = new Rect(); - public MotionEventForwarder(final Sender senderView, final Receiver receiverView) { + public MotionEventForwarder(final SenderView senderView, final ReceiverView receiverView) { mSenderView = senderView; mReceiverView = receiverView; } @@ -96,12 +117,12 @@ public final class InputView extends LinearLayout { // Return true if a touch event of global coordinate x, y needs to be forwarded. protected abstract boolean needsToForward(final int x, final int y); - // Translate global x-coordinate to <code>Receiver</code> local coordinate. + // Translate global x-coordinate to <code>ReceiverView</code> local coordinate. protected int translateX(final int x) { return x - mEventReceivingRect.left; } - // Translate global y-coordinate to <code>Receiver</code> local coordinate. + // Translate global y-coordinate to <code>ReceiverView</code> local coordinate. protected int translateY(final int y) { return y - mEventReceivingRect.top; } @@ -109,49 +130,36 @@ public final class InputView extends LinearLayout { // Callback when a {@link MotionEvent} is forwarded. protected void onForwardingEvent(final MotionEvent me) {} - // Dispatches a {@link MotioneEvent} to <code>Receiver</code> if needed and returns true. - // Otherwise returns false. - public boolean dispatchTouchEvent(final int x, final int y, final MotionEvent me) { - // Forwards a {link MotionEvent} only if both <code>Sender</code> and - // <code>Receiver</code> are visible. + // Returns true if a {@link MotionEvent} is needed to be forwarded to + // <code>ReceiverView</code>. Otherwise returns false. + public boolean onInterceptTouchEvent(final int x, final int y, final MotionEvent me) { + // Forwards a {link MotionEvent} only if both <code>SenderView</code> and + // <code>ReceiverView</code> are visible. if (mSenderView.getVisibility() != View.VISIBLE || mReceiverView.getVisibility() != View.VISIBLE) { return false; } - final Rect sendingRect = mEventSendingRect; - mSenderView.getGlobalVisibleRect(sendingRect); - if (!mIsForwardingEvent && !sendingRect.contains(x, y)) { + mSenderView.getGlobalVisibleRect(mEventSendingRect); + if (!mEventSendingRect.contains(x, y)) { return false; } - boolean shouldForwardToReceiver = false; - - switch (me.getActionMasked()) { - case MotionEvent.ACTION_DOWN: - // If the down event happens in the forwarding area, successive {@link MotionEvent}s - // should be forwarded. + if (me.getActionMasked() == MotionEvent.ACTION_DOWN) { + // If the down event happens in the forwarding area, successive + // {@link MotionEvent}s should be forwarded to <code>ReceiverView</code>. if (needsToForward(x, y)) { - mIsForwardingEvent = true; - shouldForwardToReceiver = true; + return true; } - break; - case MotionEvent.ACTION_MOVE: - shouldForwardToReceiver = mIsForwardingEvent; - break; - case MotionEvent.ACTION_UP: - case MotionEvent.ACTION_CANCEL: - shouldForwardToReceiver = mIsForwardingEvent; - mIsForwardingEvent = false; - break; } - if (!shouldForwardToReceiver) { - return false; - } + return false; + } - final Rect receivingRect = mEventReceivingRect; - mReceiverView.getGlobalVisibleRect(receivingRect); - // Translate global coordinates to <code>Receiver</code> local coordinates. + // Returns true if a {@link MotionEvent} is forwarded to <code>ReceiverView</code>. + // Otherwise returns false. + public boolean onTouchEvent(final int x, final int y, final MotionEvent me) { + mReceiverView.getGlobalVisibleRect(mEventReceivingRect); + // Translate global coordinates to <code>ReceiverView</code> local coordinates. me.setLocation(translateX(x), translateY(y)); mReceiverView.dispatchTouchEvent(me); onForwardingEvent(me); @@ -189,8 +197,7 @@ public final class InputView extends LinearLayout { protected int translateY(final int y) { final int translatedY = super.translateY(y); if (isInKeyboardTopPadding(y)) { - // The forwarded event should have coordinates that are inside of - // the target. + // The forwarded event should have coordinates that are inside of the target. return Math.min(translatedY, mEventReceivingRect.height() - 1); } return translatedY; @@ -200,8 +207,8 @@ public final class InputView extends LinearLayout { /** * This class forwards {@link MotionEvent}s happened in the {@link MainKeyboardView} to * {@link SuggestionStripView} when the {@link MoreSuggestionsView} is showing. - * {@link SuggestionStripView} dismisses {@link MoreSuggestionsView} when it receives those - * events. + * {@link SuggestionStripView} dismisses {@link MoreSuggestionsView} when it receives any event + * outside of it. */ private static class MoreSuggestionsViewCanceler extends MotionEventForwarder<MainKeyboardView, SuggestionStripView> { diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 845bafe17..1631a200e 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1001,7 +1001,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen applicationSuggestedWords, null /* rawSuggestions */, false /* typedWordValid */, false /* willAutoCorrect */, - false /* isPunctuationSuggestions */, false /* isObsoleteSuggestions */, false /* isPrediction */); // When in fullscreen mode, show completions generated by the application @@ -1177,14 +1176,22 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen @Override public void onClick(final DialogInterface di, final int position) { di.dismiss(); - ImportantNoticeUtils.updateLastImportantNoticeVersion(context); - setNeutralSuggestionStrip(); + if (position == DialogInterface.BUTTON_POSITIVE) { + ImportantNoticeUtils.updateLastImportantNoticeVersion(context); + setNeutralSuggestionStrip(); + return; + } + if (position == DialogInterface.BUTTON_NEGATIVE) { + launchSettings(); + return; + } } }; final AlertDialog.Builder builder = new AlertDialog.Builder(context, AlertDialog.THEME_HOLO_DARK); builder.setMessage(R.string.important_notice_contents) - .setPositiveButton(android.R.string.ok, listener); + .setPositiveButton(android.R.string.ok, listener) + .setNegativeButton(R.string.go_to_settings, listener); showOptionDialog(builder.create(), true /* cancelable */); } @@ -1322,6 +1329,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen return true; if (null == currentSettings) return false; + if (ImportantNoticeUtils.shouldShowImportantNotice(this, currentSettings.mInputAttributes)) + return true; if (!currentSettings.isSuggestionStripVisible()) return false; if (currentSettings.isApplicationSpecifiedCompletionsOn()) @@ -1350,10 +1359,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen public void setSuggestedWords(final SuggestedWords suggestedWords, final boolean shouldShow) { mInputLogic.setSuggestedWords(suggestedWords); if (mSuggestionStripView != null) { + final SettingsValues currentSettings = mSettings.getCurrent(); final boolean showSuggestions; if (SuggestedWords.EMPTY == suggestedWords - || suggestedWords.mIsPunctuationSuggestions) { - showSuggestions = !mSuggestionStripView.maybeShowImportantNoticeTitle(); + || suggestedWords.isPunctuationSuggestions() + || !currentSettings.isSuggestionsRequested()) { + showSuggestions = !mSuggestionStripView.maybeShowImportantNoticeTitle( + currentSettings.mInputAttributes); } else { showSuggestions = true; } @@ -1430,7 +1442,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen return new SuggestedWords(typedWordAndPreviousSuggestions, null /* rawSuggestions */, false /* typedWordValid */, false /* hasAutoCorrectionCandidate */, - false /* isPunctuationSuggestions */, true /* isObsoleteSuggestions */, false /* isPrediction */); } @@ -1611,13 +1622,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen launchSubActivity(SettingsActivity.class); } - public void launchKeyboardedDialogActivity(final Class<? extends Activity> activityClass) { - // Put the text in the attached EditText into a safe, saved state before switching to a - // new activity that will also use the soft keyboard. - mInputLogic.commitTyped(mSettings.getCurrent(), LastComposedWord.NOT_A_SEPARATOR); - launchSubActivity(activityClass); - } - private void launchSubActivity(final Class<? extends Activity> activityClass) { Intent intent = new Intent(); intent.setClass(LatinIME.this, activityClass); @@ -1731,13 +1735,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final int keyboardMode = keyboard != null ? keyboard.mId.mMode : -1; p.println(" Keyboard mode = " + keyboardMode); final SettingsValues settingsValues = mSettings.getCurrent(); - p.println(" mIsSuggestionsRequested = " + settingsValues.isSuggestionsRequested()); - p.println(" mCorrectionEnabled=" + settingsValues.mCorrectionEnabled); - p.println(" isComposingWord=" + mInputLogic.mWordComposer.isComposingWord()); - p.println(" mSoundOn=" + settingsValues.mSoundOn); - p.println(" mVibrateOn=" + settingsValues.mVibrateOn); - p.println(" mKeyPreviewPopupOn=" + settingsValues.mKeyPreviewPopupOn); - p.println(" inputAttributes=" + settingsValues.mInputAttributes); + p.println(settingsValues.dump()); // TODO: Dump all settings values } } diff --git a/java/src/com/android/inputmethod/latin/PunctuationSuggestions.java b/java/src/com/android/inputmethod/latin/PunctuationSuggestions.java new file mode 100644 index 000000000..4911bcdf6 --- /dev/null +++ b/java/src/com/android/inputmethod/latin/PunctuationSuggestions.java @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2014 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 com.android.inputmethod.keyboard.internal.KeySpecParser; +import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; +import com.android.inputmethod.latin.utils.CollectionUtils; +import com.android.inputmethod.latin.utils.StringUtils; + +import java.util.ArrayList; +import java.util.Arrays; + +/** + * The extended {@link SuggestedWords} class to represent punctuation suggestions. + * + * Each punctuation specification string is the key specification that can be parsed by + * {@link KeySpecParser}. + */ +public final class PunctuationSuggestions extends SuggestedWords { + private PunctuationSuggestions(final ArrayList<SuggestedWordInfo> punctuationsList) { + super(punctuationsList, + null /* rawSuggestions */, + false /* typedWordValid */, + false /* hasAutoCorrectionCandidate */, + false /* isObsoleteSuggestions */, + false /* isPrediction */); + } + + /** + * Create new instance of {@link PunctuationSuggestions} from the array of punctuation key + * specifications. + * + * @param punctuationSpecs The array of punctuation key specifications. + * @return The {@link PunctuationSuggestions} object. + */ + public static PunctuationSuggestions newPunctuationSuggestions( + final String[] punctuationSpecs) { + final ArrayList<SuggestedWordInfo> puncuationsList = CollectionUtils.newArrayList(); + for (final String puncSpec : punctuationSpecs) { + puncuationsList.add(newHardCodedWordInfo(puncSpec)); + } + return new PunctuationSuggestions(puncuationsList); + } + + /** + * {@inheritDoc} + * Note that {@link super#getWord(int)} returns a punctuation key specification text. + * The suggested punctuation should be gotten by parsing the key specification. + */ + @Override + public String getWord(final int index) { + final String keySpec = super.getWord(index); + final int code = KeySpecParser.getCode(keySpec); + return (code == Constants.CODE_OUTPUT_TEXT) + ? KeySpecParser.getOutputText(keySpec) + : StringUtils.newSingleCodePointString(code); + } + + /** + * {@inheritDoc} + * Note that {@link super#getWord(int)} returns a punctuation key specification text. + * The displayed text should be gotten by parsing the key specification. + */ + @Override + public String getLabel(final int index) { + final String keySpec = super.getWord(index); + return KeySpecParser.getLabel(keySpec); + } + + /** + * {@inheritDoc} + * Note that {@link #getWord(int)} returns a suggested punctuation. We should create a + * {@link SuggestedWordInfo} object that represents a hard coded word. + */ + @Override + public SuggestedWordInfo getInfo(final int index) { + return newHardCodedWordInfo(getWord(index)); + } + + /** + * The predicator to tell whether this object represents punctuation suggestions. + * @return true if this object represents punctuation suggestions. + */ + @Override + public boolean isPunctuationSuggestions() { + return true; + } + + @Override + public String toString() { + return "PunctuationSuggestions: " + + " words=" + Arrays.toString(mSuggestedWordInfoList.toArray()); + } + + private static SuggestedWordInfo newHardCodedWordInfo(final String keySpec) { + return new SuggestedWordInfo(keySpec, SuggestedWordInfo.MAX_SCORE, + SuggestedWordInfo.KIND_HARDCODED, + Dictionary.DICTIONARY_HARDCODED, + SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */, + SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */); + } +} diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index 0d0b7a160..eb1899ca2 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -668,12 +668,16 @@ public final class RichInputConnection { } } + final boolean hasUrlSpans = + SpannableStringUtils.hasUrlSpans(before, startIndexInBefore, before.length()) + || SpannableStringUtils.hasUrlSpans(after, 0, endIndexInAfter); // We don't use TextUtils#concat because it copies all spans without respect to their // nature. If the text includes a PARAGRAPH span and it has been split, then // TextUtils#concat will crash when it tries to concat both sides of it. return new TextRange( SpannableStringUtils.concatWithNonParagraphSuggestionSpansOnly(before, after), - startIndexInBefore, before.length() + endIndexInAfter, before.length()); + startIndexInBefore, before.length() + endIndexInAfter, before.length(), + hasUrlSpans); } public boolean isCursorTouchingWord(final SpacingAndPunctuations spacingAndPunctuations) { diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 5e74d75b0..abf831a28 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -227,7 +227,6 @@ public final class Suggest { // rename the attribute or change the value. !allowsToBeAutoCorrected /* typedWordValid */, hasAutoCorrection, /* willAutoCorrect */ - false /* isPunctuationSuggestions */, false /* isObsoleteSuggestions */, !wordComposer.isComposingWord() /* isPrediction */, sequenceNumber)); } @@ -289,7 +288,6 @@ public final class Suggest { callback.onGetSuggestedWords(new SuggestedWords(suggestionsContainer, rawSuggestions, true /* typedWordValid */, false /* willAutoCorrect */, - false /* isPunctuationSuggestions */, false /* isObsoleteSuggestions */, false /* isPrediction */, sequenceNumber)); } diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index b2efc4a86..46df3e88c 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -26,7 +26,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; -public final class SuggestedWords { +public class SuggestedWords { public static final int INDEX_OF_TYPED_WORD = 0; public static final int INDEX_OF_AUTO_CORRECTION = 1; public static final int NOT_A_SEQUENCE_NUMBER = -1; @@ -37,7 +37,7 @@ public final class SuggestedWords { private static final ArrayList<SuggestedWordInfo> EMPTY_WORD_INFO_LIST = CollectionUtils.newArrayList(0); public static final SuggestedWords EMPTY = new SuggestedWords( - EMPTY_WORD_INFO_LIST, null /* rawSuggestions */, false, false, false, false, false); + EMPTY_WORD_INFO_LIST, null /* rawSuggestions */, false, false, false, false); public final String mTypedWord; public final boolean mTypedWordValid; @@ -45,38 +45,34 @@ public final class SuggestedWords { // of what this flag means would be "the top suggestion is strong enough to auto-correct", // whether this exactly matches the user entry or not. public final boolean mWillAutoCorrect; - public final boolean mIsPunctuationSuggestions; public final boolean mIsObsoleteSuggestions; public final boolean mIsPrediction; public final int mSequenceNumber; // Sequence number for auto-commit. - private final ArrayList<SuggestedWordInfo> mSuggestedWordInfoList; + protected final ArrayList<SuggestedWordInfo> mSuggestedWordInfoList; public final ArrayList<SuggestedWordInfo> mRawSuggestions; public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList, final ArrayList<SuggestedWordInfo> rawSuggestions, final boolean typedWordValid, final boolean willAutoCorrect, - final boolean isPunctuationSuggestions, final boolean isObsoleteSuggestions, final boolean isPrediction) { this(suggestedWordInfoList, rawSuggestions, typedWordValid, willAutoCorrect, - isPunctuationSuggestions, isObsoleteSuggestions, isPrediction, - NOT_A_SEQUENCE_NUMBER); + isObsoleteSuggestions, isPrediction, NOT_A_SEQUENCE_NUMBER); } public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList, final ArrayList<SuggestedWordInfo> rawSuggestions, final boolean typedWordValid, final boolean willAutoCorrect, - final boolean isPunctuationSuggestions, final boolean isObsoleteSuggestions, final boolean isPrediction, final int sequenceNumber) { this(suggestedWordInfoList, rawSuggestions, suggestedWordInfoList.isEmpty() ? null : suggestedWordInfoList.get(INDEX_OF_TYPED_WORD).mWord, - typedWordValid, willAutoCorrect, isPunctuationSuggestions, - isObsoleteSuggestions, isPrediction, sequenceNumber); + typedWordValid, willAutoCorrect, isObsoleteSuggestions, isPrediction, + sequenceNumber); } public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList, @@ -84,7 +80,6 @@ public final class SuggestedWords { final String typedWord, final boolean typedWordValid, final boolean willAutoCorrect, - final boolean isPunctuationSuggestions, final boolean isObsoleteSuggestions, final boolean isPrediction, final int sequenceNumber) { @@ -92,7 +87,6 @@ public final class SuggestedWords { mRawSuggestions = rawSuggestions; mTypedWordValid = typedWordValid; mWillAutoCorrect = willAutoCorrect; - mIsPunctuationSuggestions = isPunctuationSuggestions; mIsObsoleteSuggestions = isObsoleteSuggestions; mIsPrediction = isPrediction; mSequenceNumber = sequenceNumber; @@ -107,10 +101,32 @@ public final class SuggestedWords { return mSuggestedWordInfoList.size(); } + /** + * Get suggested word at <code>index</code>. + * @param index The index of the suggested word. + * @return The suggested word. + */ public String getWord(final int index) { return mSuggestedWordInfoList.get(index).mWord; } + /** + * Get displayed text at <code>index</code>. + * In RTL languages, the displayed text on the suggestion strip may be different from the + * suggested word that is returned from {@link #getWord(int)}. For example the displayed text + * of punctuation suggestion "(" should be ")". + * @param index The index of the text to display. + * @return The text to be displayed. + */ + public String getLabel(final int index) { + return mSuggestedWordInfoList.get(index).mWord; + } + + /** + * Get {@link SuggestedWordInfo} object at <code>index</code>. + * @param index The index of the {@link SuggestedWordInfo}. + * @return The {@link SuggestedWordInfo} object. + */ public SuggestedWordInfo getInfo(final int index) { return mSuggestedWordInfoList.get(index); } @@ -130,13 +146,20 @@ public final class SuggestedWords { return debugString; } + /** + * The predicator to tell whether this object represents punctuation suggestions. + * @return false if this object desn't represent punctuation suggestions. + */ + public boolean isPunctuationSuggestions() { + return false; + } + @Override public String toString() { // Pretty-print method to help debug return "SuggestedWords:" + " mTypedWordValid=" + mTypedWordValid + " mWillAutoCorrect=" + mWillAutoCorrect - + " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions + " words=" + Arrays.toString(mSuggestedWordInfoList.toArray()); } @@ -313,8 +336,8 @@ public final class SuggestedWords { // We should never autocorrect, so we say the typed word is valid. Also, in this case, // no auto-correction should take place hence willAutoCorrect = false. return new SuggestedWords(newSuggestions, null /* rawSuggestions */, typedWord, - true /* typedWordValid */, false /* willAutoCorrect */, mIsPunctuationSuggestions, - mIsObsoleteSuggestions, mIsPrediction, NOT_A_SEQUENCE_NUMBER); + true /* typedWordValid */, false /* willAutoCorrect */, mIsObsoleteSuggestions, + mIsPrediction, NOT_A_SEQUENCE_NUMBER); } // Creates a new SuggestedWordInfo from the currently suggested words that removes all but the @@ -333,7 +356,6 @@ public final class SuggestedWords { SuggestedWordInfo.NOT_A_CONFIDENCE)); } return new SuggestedWords(newSuggestions, null /* rawSuggestions */, mTypedWordValid, - mWillAutoCorrect, mIsPunctuationSuggestions, mIsObsoleteSuggestions, - mIsPrediction); + mWillAutoCorrect, mIsObsoleteSuggestions, mIsPrediction); } } diff --git a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserBinaryDictionary.java b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserBinaryDictionary.java index 9ccd9e4e8..801fb5b89 100644 --- a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserBinaryDictionary.java @@ -28,12 +28,12 @@ public final class SynchronouslyLoadedUserBinaryDictionary extends UserBinaryDic private final Object mLock = new Object(); public SynchronouslyLoadedUserBinaryDictionary(final Context context, final Locale locale) { - this(context, locale, false); + this(context, locale, false /* alsoUseMoreRestrictiveLocales */); } public SynchronouslyLoadedUserBinaryDictionary(final Context context, final Locale locale, final boolean alsoUseMoreRestrictiveLocales) { - super(context, locale, alsoUseMoreRestrictiveLocales); + super(context, locale, alsoUseMoreRestrictiveLocales, null /* dictFile */); } @Override diff --git a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java index 8011247c6..2a195f58b 100644 --- a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java @@ -28,7 +28,6 @@ import android.provider.UserDictionary.Words; import android.text.TextUtils; import android.util.Log; -import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.compat.UserDictionaryCompatUtils; import com.android.inputmethod.latin.utils.LocaleUtils; import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; @@ -78,19 +77,17 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary { final public boolean mEnabled; public UserBinaryDictionary(final Context context, final Locale locale) { - this(context, locale, false); + this(context, locale, false /* alsoUseMoreRestrictiveLocales */, null /* dictFile */); } - // Dummy constructor for tests. - @UsedForTesting - public UserBinaryDictionary(final Context context, final Locale locale, final File file) { - this(context, locale); + public UserBinaryDictionary(final Context context, final Locale locale, final File dictFile) { + this(context, locale, false /* alsoUseMoreRestrictiveLocales */, dictFile); } public UserBinaryDictionary(final Context context, final Locale locale, - final boolean alsoUseMoreRestrictiveLocales) { - super(context, getDictNameWithLocale(NAME, locale), locale, Dictionary.TYPE_USER, - false /* isUpdatable */); + final boolean alsoUseMoreRestrictiveLocales, final File dictFile) { + super(context, getDictName(NAME, locale, dictFile), locale, Dictionary.TYPE_USER, + false /* isUpdatable */, dictFile); if (null == locale) throw new NullPointerException(); // Catch the error earlier final String localeStr = locale.toString(); if (SubtypeLocaleUtils.NO_LANGUAGE.equals(localeStr)) { diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 6e9050593..9bf9d1f45 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -973,7 +973,13 @@ public final class InputLogic { } else { final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor(); if (codePointBeforeCursor == Constants.NOT_A_CODE) { - // Nothing to delete before the cursor. + // HACK for backward compatibility with broken apps that haven't realized + // yet that hardware keyboards are not the only way of inputting text. + // Nothing to delete before the cursor. We should not do anything, but many + // broken apps expect something to happen in this case so that they can + // catch it and have their broken interface react. If you need the keyboard + // to do this, you're doing it wrong -- please fix your app. + mConnection.deleteSurroundingText(1, 0); return; } final int lengthToDelete = @@ -1264,6 +1270,10 @@ public final class InputLogic { if (range.length() <= 0) return; // Race condition. No text to resume on, so bail out. // If for some strange reason (editor bug or so) we measure the text before the cursor as // longer than what the entire text is supposed to be, the safe thing to do is bail out. + if (range.mHasUrlSpans) return; // If there are links, we don't resume suggestions. Making + // edits to a linkified text through batch commands would ruin the URL spans, and unless + // we take very complicated steps to preserve the whole link, we can't do things right so + // we just do not resume because it's safer. final int numberOfCharsInWordBeforeCursor = range.getNumberOfCharsInWordBeforeCursor(); if (numberOfCharsInWordBeforeCursor > expectedCursorPosition) return; final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList(); @@ -1335,8 +1345,8 @@ public final class InputLogic { final SuggestedWords suggestedWords = new SuggestedWords(suggestions, null /* rawSuggestions */, typedWord, true /* typedWordValid */, false /* willAutoCorrect */, - false /* isPunctuationSuggestions */, false /* isObsoleteSuggestions */, - false /* isPrediction */, SuggestedWords.NOT_A_SEQUENCE_NUMBER); + false /* isObsoleteSuggestions */, false /* isPrediction */, + SuggestedWords.NOT_A_SEQUENCE_NUMBER); mIsAutoCorrectionIndicatorOn = false; mLatinIME.mHandler.showSuggestionStrip(suggestedWords); } @@ -1355,6 +1365,7 @@ public final class InputLogic { final String previousWord = mLastComposedWord.mPrevWord; final CharSequence originallyTypedWord = mLastComposedWord.mTypedWord; final CharSequence committedWord = mLastComposedWord.mCommittedWord; + final String committedWordString = committedWord.toString(); final int cancelLength = committedWord.length(); // We want java chars, not codepoints for the following. final int separatorLength = mLastComposedWord.mSeparatorString.length(); @@ -1376,33 +1387,44 @@ public final class InputLogic { if (!TextUtils.isEmpty(previousWord) && !TextUtils.isEmpty(committedWord)) { if (mSuggest != null) { mSuggest.mDictionaryFacilitator.cancelAddingUserHistory( - previousWord, committedWord.toString()); + previousWord, committedWordString); } } final String stringToCommit = originallyTypedWord + mLastComposedWord.mSeparatorString; final SpannableString textToCommit = new SpannableString(stringToCommit); if (committedWord instanceof SpannableString) { - final int lastCharIndex = textToCommit.length() - 1; - // Add the auto-correction to the list of suggestions. - textToCommit.setSpan(new SuggestionSpan(settingsValues.mLocale, - new String[] { committedWord.toString() }, 0 /* flags */), - 0 /* start */, lastCharIndex /* end */, 0 /* flags */); final SpannableString committedWordWithSuggestionSpans = (SpannableString)committedWord; final Object[] spans = committedWordWithSuggestionSpans.getSpans(0, committedWord.length(), Object.class); + final int lastCharIndex = textToCommit.length() - 1; + // We will collect all suggestions in the following array. + final ArrayList<String> suggestions = CollectionUtils.newArrayList(); + // First, add the committed word to the list of suggestions. + suggestions.add(committedWordString); for (final Object span : spans) { - // Put all the spans in the original text on this new text. We could remove the - // typed word from the suggestions, but we'd have to make more dynamic instanceof - // checks, to copy the span, copy all suggestions and attributes... And there is - // the risk to drop the originally typed string if there is a subtle bug. There is - // still the committed auto-correction that we reverted from, which is not included - // in the suggestions, that's why we added it with another call to setSpan a few - // lines above. - // The code that re-reads these spans already knows to do the right thing whether - // the typed word is included or not. That should be enough. - textToCommit.setSpan(span, 0 /* start */, lastCharIndex /* end */, - committedWordWithSuggestionSpans.getSpanFlags(span)); + // If this is a suggestion span, we check that the locale is the right one, and + // that the word is not the committed word. That should mostly be the case. + // Given this, we add it to the list of suggestions, otherwise we discard it. + if (span instanceof SuggestionSpan) { + final SuggestionSpan suggestionSpan = (SuggestionSpan)span; + if (!suggestionSpan.getLocale().equals(settingsValues.mLocale.toString())) { + continue; + } + for (final String suggestion : suggestionSpan.getSuggestions()) { + if (!suggestion.equals(committedWordString)) { + suggestions.add(suggestion); + } + } + } else { + // If this is not a suggestion span, we just add it as is. + textToCommit.setSpan(span, 0 /* start */, lastCharIndex /* end */, + committedWordWithSuggestionSpans.getSpanFlags(span)); + } } + // Add the suggestion list to the list of suggestions. + textToCommit.setSpan(new SuggestionSpan(settingsValues.mLocale, + suggestions.toArray(new String[suggestions.size()]), 0 /* flags */), + 0 /* start */, lastCharIndex /* end */, 0 /* flags */); } if (settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces) { // For languages with spaces, we revert to the typed string, but the cursor is still diff --git a/java/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java index 1bc322724..bc856f113 100644 --- a/java/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java @@ -17,14 +17,10 @@ package com.android.inputmethod.latin.makedict; import com.android.inputmethod.annotations.UsedForTesting; -import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding; -import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.DictBuffer; -import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; -import java.util.HashMap; import java.util.TreeMap; /** @@ -35,34 +31,6 @@ public abstract class AbstractDictDecoder implements DictDecoder { private static final int ERROR_CANNOT_READ = 1; private static final int ERROR_WRONG_FORMAT = 2; - protected DictionaryHeader readHeader(final DictBuffer headerBuffer) - throws IOException, UnsupportedFormatException { - if (headerBuffer == null) { - openDictBuffer(); - } - - final int version = HeaderReader.readVersion(headerBuffer); - if (version < FormatSpec.MINIMUM_SUPPORTED_VERSION - || version > FormatSpec.MAXIMUM_SUPPORTED_VERSION) { - throw new UnsupportedFormatException("Unsupported version : " + version); - } - // TODO: Remove this field. - HeaderReader.readOptionFlags(headerBuffer); - final int headerSize = HeaderReader.readHeaderSize(headerBuffer); - if (headerSize < 0) { - throw new UnsupportedFormatException("header size can't be negative."); - } - - final HashMap<String, String> attributes = HeaderReader.readAttributes(headerBuffer, - headerSize); - - final DictionaryHeader header = new DictionaryHeader(headerSize, - new FusionDictionary.DictionaryOptions(attributes), - new FormatOptions(version, DictionaryHeader.ATTRIBUTE_VALUE_TRUE.equals( - attributes.get(DictionaryHeader.HAS_HISTORICAL_INFO_KEY)))); - return header; - } - @Override @UsedForTesting public int getTerminalPosition(final String word) throws IOException, UnsupportedFormatException { @@ -84,38 +52,6 @@ public abstract class AbstractDictDecoder implements DictDecoder { } /** - * A utility class for reading a file header. - */ - protected static class HeaderReader { - protected static int readVersion(final DictBuffer dictBuffer) - throws IOException, UnsupportedFormatException { - return BinaryDictDecoderUtils.checkFormatVersion(dictBuffer); - } - - protected static int readOptionFlags(final DictBuffer dictBuffer) { - return dictBuffer.readUnsignedShort(); - } - - protected static int readHeaderSize(final DictBuffer dictBuffer) { - return dictBuffer.readInt(); - } - - protected static HashMap<String, String> readAttributes(final DictBuffer dictBuffer, - final int headerSize) { - final HashMap<String, String> attributes = new HashMap<String, String>(); - while (dictBuffer.position() < headerSize) { - // We can avoid an infinite loop here since dictBuffer.position() is always - // increased by calling CharEncoding.readString. - final String key = CharEncoding.readString(dictBuffer); - final String value = CharEncoding.readString(dictBuffer); - attributes.put(key, value); - } - dictBuffer.position(headerSize); - return attributes; - } - } - - /** * Check whether the header contains the expected information. This is a no-error method, * that will return an error code and never throw a checked exception. * @return an error code, either ERROR_* or SUCCESS. @@ -148,7 +84,7 @@ public abstract class AbstractDictDecoder implements DictDecoder { } @Override - public PtNodeInfo readPtNode(final int ptNodePos, final FormatOptions options) { + public PtNodeInfo readPtNode(final int ptNodePos) { return null; } @@ -165,14 +101,4 @@ public abstract class AbstractDictDecoder implements DictDecoder { public int readPtNodeCount() { return 0; } - - @Override - public boolean readAndFollowForwardLink() { - return false; - } - - @Override - public boolean hasNextPtNodeArray() { - return false; - } } diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java index fc5788de9..b534ebeff 100644 --- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java +++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java @@ -17,18 +17,12 @@ package com.android.inputmethod.latin.makedict; import com.android.inputmethod.annotations.UsedForTesting; -import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; -import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode; -import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray; import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.Map; -import java.util.TreeMap; /** * Decodes binary files for a FusionDictionary. @@ -47,8 +41,6 @@ public final class BinaryDictDecoderUtils { // This utility class is not publicly instantiable. } - private static final int MAX_JUMPS = 12; - @UsedForTesting public interface DictBuffer { public int readUnsignedByte(); @@ -296,60 +288,21 @@ public final class BinaryDictDecoderUtils { * @param dictDecoder the dict decoder. * @param headerSize the size of the header. * @param pos the position to seek. - * @param formatOptions file format options. * @return the word with its frequency, as a weighted string. */ + @UsedForTesting /* package for tests */ static WeightedString getWordAtPosition(final DictDecoder dictDecoder, - final int headerSize, final int pos, final FormatOptions formatOptions) { + final int headerSize, final int pos) { final WeightedString result; final int originalPos = dictDecoder.getPosition(); dictDecoder.setPosition(pos); - - if (BinaryDictIOUtils.supportsDynamicUpdate(formatOptions)) { - result = getWordAtPositionWithParentAddress(dictDecoder, pos, formatOptions); - } else { - result = getWordAtPositionWithoutParentAddress(dictDecoder, headerSize, pos, - formatOptions); - } - + result = getWordAtPositionWithoutParentAddress(dictDecoder, headerSize, pos); dictDecoder.setPosition(originalPos); return result; } - @SuppressWarnings("unused") - private static WeightedString getWordAtPositionWithParentAddress(final DictDecoder dictDecoder, - final int pos, final FormatOptions options) { - int currentPos = pos; - ProbabilityInfo probabilityInfo = null; - final StringBuilder builder = new StringBuilder(); - // the length of the path from the root to the leaf is limited by MAX_WORD_LENGTH - for (int count = 0; count < FormatSpec.MAX_WORD_LENGTH; ++count) { - PtNodeInfo currentInfo; - int loopCounter = 0; - do { - dictDecoder.setPosition(currentPos); - currentInfo = dictDecoder.readPtNode(currentPos, options); - if (BinaryDictIOUtils.isMovedPtNode(currentInfo.mFlags, options)) { - currentPos = currentInfo.mParentAddress + currentInfo.mOriginalAddress; - } - if (DBG && loopCounter++ > MAX_JUMPS) { - MakedictLog.d("Too many jumps - probably a bug"); - } - } while (BinaryDictIOUtils.isMovedPtNode(currentInfo.mFlags, options)); - if (probabilityInfo == null) { - probabilityInfo = currentInfo.mProbabilityInfo; - } - builder.insert(0, - new String(currentInfo.mCharacters, 0, currentInfo.mCharacters.length)); - if (currentInfo.mParentAddress == FormatSpec.NO_PARENT_ADDRESS) break; - currentPos = currentInfo.mParentAddress + currentInfo.mOriginalAddress; - } - return new WeightedString(builder.toString(), probabilityInfo); - } - private static WeightedString getWordAtPositionWithoutParentAddress( - final DictDecoder dictDecoder, final int headerSize, final int pos, - final FormatOptions options) { + final DictDecoder dictDecoder, final int headerSize, final int pos) { dictDecoder.setPosition(headerSize); final int count = dictDecoder.readPtNodeCount(); int groupPos = dictDecoder.getPosition(); @@ -358,7 +311,7 @@ public final class BinaryDictDecoderUtils { PtNodeInfo last = null; for (int i = count - 1; i >= 0; --i) { - PtNodeInfo info = dictDecoder.readPtNode(groupPos, options); + PtNodeInfo info = dictDecoder.readPtNode(groupPos); groupPos = info.mEndAddress; if (info.mOriginalAddress == pos) { builder.append(new String(info.mCharacters, 0, info.mCharacters.length)); @@ -390,159 +343,6 @@ public final class BinaryDictDecoderUtils { } /** - * Reads a single node array from a buffer. - * - * This methods reads the file at the current position. A node array is fully expected to start - * at the current position. - * This will recursively read other node arrays into the structure, populating the reverse - * maps on the fly and using them to keep track of already read nodes. - * - * @param dictDecoder the dict decoder, correctly positioned at the start of a node array. - * @param headerSize the size, in bytes, of the file header. - * @param reverseNodeArrayMap a mapping from addresses to already read node arrays. - * @param reversePtNodeMap a mapping from addresses to already read PtNodes. - * @param options file format options. - * @return the read node array with all his children already read. - */ - private static PtNodeArray readNodeArray(final DictDecoder dictDecoder, - final int headerSize, final Map<Integer, PtNodeArray> reverseNodeArrayMap, - final Map<Integer, PtNode> reversePtNodeMap, final FormatOptions options) - throws IOException { - final ArrayList<PtNode> nodeArrayContents = new ArrayList<PtNode>(); - final int nodeArrayOriginPos = dictDecoder.getPosition(); - - do { // Scan the linked-list node. - final int count = dictDecoder.readPtNodeCount(); - int groupPos = dictDecoder.getPosition(); - for (int i = count; i > 0; --i) { // Scan the array of PtNode. - PtNodeInfo info = dictDecoder.readPtNode(groupPos, options); - if (BinaryDictIOUtils.isMovedPtNode(info.mFlags, options)) continue; - ArrayList<WeightedString> shortcutTargets = info.mShortcutTargets; - ArrayList<WeightedString> bigrams = null; - if (null != info.mBigrams) { - bigrams = new ArrayList<WeightedString>(); - for (PendingAttribute bigram : info.mBigrams) { - final WeightedString word = getWordAtPosition(dictDecoder, headerSize, - bigram.mAddress, options); - final int reconstructedFrequency = - BinaryDictIOUtils.reconstructBigramFrequency(word.getProbability(), - bigram.mFrequency); - bigrams.add(new WeightedString(word.mWord, reconstructedFrequency)); - } - } - if (BinaryDictIOUtils.hasChildrenAddress(info.mChildrenAddress)) { - PtNodeArray children = reverseNodeArrayMap.get(info.mChildrenAddress); - if (null == children) { - final int currentPosition = dictDecoder.getPosition(); - dictDecoder.setPosition(info.mChildrenAddress); - children = readNodeArray(dictDecoder, headerSize, reverseNodeArrayMap, - reversePtNodeMap, options); - dictDecoder.setPosition(currentPosition); - } - nodeArrayContents.add( - new PtNode(info.mCharacters, shortcutTargets, bigrams, - info.mProbabilityInfo, - 0 != (info.mFlags & FormatSpec.FLAG_IS_NOT_A_WORD), - 0 != (info.mFlags & FormatSpec.FLAG_IS_BLACKLISTED), children)); - } else { - nodeArrayContents.add( - new PtNode(info.mCharacters, shortcutTargets, bigrams, - info.mProbabilityInfo, - 0 != (info.mFlags & FormatSpec.FLAG_IS_NOT_A_WORD), - 0 != (info.mFlags & FormatSpec.FLAG_IS_BLACKLISTED))); - } - groupPos = info.mEndAddress; - } - - // reach the end of the array. - if (options.supportsDynamicUpdate()) { - final boolean hasValidForwardLink = dictDecoder.readAndFollowForwardLink(); - if (!hasValidForwardLink) break; - } - } while (options.supportsDynamicUpdate() && dictDecoder.hasNextPtNodeArray()); - - final PtNodeArray nodeArray = new PtNodeArray(nodeArrayContents); - nodeArray.mCachedAddressBeforeUpdate = nodeArrayOriginPos; - nodeArray.mCachedAddressAfterUpdate = nodeArrayOriginPos; - reverseNodeArrayMap.put(nodeArray.mCachedAddressAfterUpdate, nodeArray); - return nodeArray; - } - - /** - * Helper function to get the binary format version from the header. - * @throws IOException - */ - private static int getFormatVersion(final DictBuffer dictBuffer) - throws IOException { - final int magic = dictBuffer.readInt(); - if (FormatSpec.MAGIC_NUMBER == magic) return dictBuffer.readUnsignedShort(); - return FormatSpec.NOT_A_VERSION_NUMBER; - } - - /** - * Helper function to get and validate the binary format version. - * @throws UnsupportedFormatException - * @throws IOException - */ - static int checkFormatVersion(final DictBuffer dictBuffer) - throws IOException, UnsupportedFormatException { - final int version = getFormatVersion(dictBuffer); - if (version < FormatSpec.MINIMUM_SUPPORTED_VERSION - || version > FormatSpec.MAXIMUM_SUPPORTED_VERSION) { - throw new UnsupportedFormatException("This file has version " + version - + ", but this implementation does not support versions above " - + FormatSpec.MAXIMUM_SUPPORTED_VERSION); - } - return version; - } - - /** - * Reads a buffer and returns the memory representation of the dictionary. - * - * This high-level method takes a buffer and reads its contents, populating a - * FusionDictionary structure. The optional dict argument is an existing dictionary to - * which words from the buffer should be added. If it is null, a new dictionary is created. - * - * @param dictDecoder the dict decoder. - * @param dict an optional dictionary to add words to, or null. - * @return the created (or merged) dictionary. - */ - @UsedForTesting - /* package */ static FusionDictionary readDictionaryBinary(final DictDecoder dictDecoder, - final FusionDictionary dict) throws IOException, UnsupportedFormatException { - // Read header - final DictionaryHeader fileHeader = dictDecoder.readHeader(); - - Map<Integer, PtNodeArray> reverseNodeArrayMapping = new TreeMap<Integer, PtNodeArray>(); - Map<Integer, PtNode> reversePtNodeMapping = new TreeMap<Integer, PtNode>(); - final PtNodeArray root = readNodeArray(dictDecoder, fileHeader.mBodyOffset, - reverseNodeArrayMapping, reversePtNodeMapping, fileHeader.mFormatOptions); - - FusionDictionary newDict = new FusionDictionary(root, fileHeader.mDictionaryOptions); - if (null != dict) { - for (final WordProperty wordProperty : dict) { - if (wordProperty.mIsBlacklistEntry) { - newDict.addBlacklistEntry(wordProperty.mWord, wordProperty.mShortcutTargets, - wordProperty.mIsNotAWord); - } else { - newDict.add(wordProperty.mWord, wordProperty.mProbabilityInfo, - wordProperty.mShortcutTargets, wordProperty.mIsNotAWord); - } - } - for (final WordProperty wordProperty : dict) { - // By construction a binary dictionary may not have bigrams pointing to - // words that are not also registered as unigrams so we don't have to avoid - // them explicitly here. - for (final WeightedString bigram : wordProperty.mBigrams) { - newDict.setBigram(wordProperty.mWord, bigram.mWord, bigram.mProbabilityInfo); - } - } - } - - return newDict; - } - - /** * Helper method to pass a file name instead of a File object to isBinaryDictionary. */ public static boolean isBinaryDictionary(final String filename) { diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java index 9c5d1b9d7..1593dea4f 100644 --- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java +++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java @@ -122,18 +122,13 @@ public class BinaryDictEncoderUtils { * Compute the maximum size of a PtNode, assuming 3-byte addresses for everything. * * @param ptNode the PtNode to compute the size of. - * @param options file format options. * @return the maximum size of the PtNode. */ - private static int getPtNodeMaximumSize(final PtNode ptNode, final FormatOptions options) { - int size = getNodeHeaderSize(ptNode, options); + private static int getPtNodeMaximumSize(final PtNode ptNode) { + int size = getNodeHeaderSize(ptNode); if (ptNode.isTerminal()) { - // If terminal, one byte for the frequency or four bytes for the terminal id. - if (options.mHasTerminalId) { - size += FormatSpec.PTNODE_TERMINAL_ID_SIZE; - } else { - size += FormatSpec.PTNODE_FREQUENCY_SIZE; - } + // If terminal, one byte for the frequency. + size += FormatSpec.PTNODE_FREQUENCY_SIZE; } size += FormatSpec.PTNODE_MAX_ADDRESS_SIZE; // For children address size += getShortcutListSize(ptNode.mShortcutTargets); @@ -151,19 +146,14 @@ public class BinaryDictEncoderUtils { * the containing node array, and cache it it its 'mCachedSize' member. * * @param ptNodeArray the node array to compute the maximum size of. - * @param options file format options. */ - private static void calculatePtNodeArrayMaximumSize(final PtNodeArray ptNodeArray, - final FormatOptions options) { + private static void calculatePtNodeArrayMaximumSize(final PtNodeArray ptNodeArray) { int size = getPtNodeCountSize(ptNodeArray); for (PtNode node : ptNodeArray.mData) { - final int nodeSize = getPtNodeMaximumSize(node, options); + final int nodeSize = getPtNodeMaximumSize(node); node.mCachedSize = nodeSize; size += nodeSize; } - if (options.supportsDynamicUpdate()) { - size += FormatSpec.FORWARD_LINK_ADDRESS_SIZE; - } ptNodeArray.mCachedSize = size; } @@ -171,15 +161,9 @@ public class BinaryDictEncoderUtils { * Compute the size of the header (flag + [parent address] + characters size) of a PtNode. * * @param ptNode the PtNode of which to compute the size of the header - * @param options file format options. */ - private static int getNodeHeaderSize(final PtNode ptNode, final FormatOptions options) { - if (BinaryDictIOUtils.supportsDynamicUpdate(options)) { - return FormatSpec.PTNODE_FLAGS_SIZE + FormatSpec.PARENT_ADDRESS_SIZE - + getPtNodeCharactersSize(ptNode); - } else { - return FormatSpec.PTNODE_FLAGS_SIZE + getPtNodeCharactersSize(ptNode); - } + private static int getNodeHeaderSize(final PtNode ptNode) { + return FormatSpec.PTNODE_FLAGS_SIZE + getPtNodeCharactersSize(ptNode); } /** @@ -379,11 +363,10 @@ public class BinaryDictEncoderUtils { * * @param ptNodeArray the node array to compute the size of. * @param dict the dictionary in which the word/attributes are to be found. - * @param formatOptions file format options. * @return false if none of the cached addresses inside the node array changed, true otherwise. */ private static boolean computeActualPtNodeArraySize(final PtNodeArray ptNodeArray, - final FusionDictionary dict, final FormatOptions formatOptions) { + final FusionDictionary dict) { boolean changed = false; int size = getPtNodeCountSize(ptNodeArray); for (PtNode ptNode : ptNodeArray.mData) { @@ -391,37 +374,26 @@ public class BinaryDictEncoderUtils { if (ptNode.mCachedAddressAfterUpdate != ptNode.mCachedAddressBeforeUpdate) { changed = true; } - int nodeSize = getNodeHeaderSize(ptNode, formatOptions); + int nodeSize = getNodeHeaderSize(ptNode); if (ptNode.isTerminal()) { - if (formatOptions.mHasTerminalId) { - nodeSize += FormatSpec.PTNODE_TERMINAL_ID_SIZE; - } else { - nodeSize += FormatSpec.PTNODE_FREQUENCY_SIZE; - } + nodeSize += FormatSpec.PTNODE_FREQUENCY_SIZE; } - if (formatOptions.supportsDynamicUpdate()) { - nodeSize += FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE; - } else if (null != ptNode.mChildren) { + if (null != ptNode.mChildren) { nodeSize += getByteSize(getOffsetToTargetNodeArrayDuringUpdate(ptNodeArray, nodeSize + size, ptNode.mChildren)); } - if (formatOptions.mVersion < FormatSpec.FIRST_VERSION_WITH_TERMINAL_ID) { - nodeSize += getShortcutListSize(ptNode.mShortcutTargets); - if (null != ptNode.mBigrams) { - for (WeightedString bigram : ptNode.mBigrams) { - final int offset = getOffsetToTargetPtNodeDuringUpdate(ptNodeArray, - nodeSize + size + FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE, - FusionDictionary.findWordInTree(dict.mRootNodeArray, bigram.mWord)); - nodeSize += getByteSize(offset) + FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE; - } + nodeSize += getShortcutListSize(ptNode.mShortcutTargets); + if (null != ptNode.mBigrams) { + for (WeightedString bigram : ptNode.mBigrams) { + final int offset = getOffsetToTargetPtNodeDuringUpdate(ptNodeArray, + nodeSize + size + FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE, + FusionDictionary.findWordInTree(dict.mRootNodeArray, bigram.mWord)); + nodeSize += getByteSize(offset) + FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE; } } ptNode.mCachedSize = nodeSize; size += nodeSize; } - if (formatOptions.supportsDynamicUpdate()) { - size += FormatSpec.FORWARD_LINK_ADDRESS_SIZE; - } if (ptNodeArray.mCachedSize != size) { ptNodeArray.mCachedSize = size; changed = true; @@ -433,11 +405,10 @@ public class BinaryDictEncoderUtils { * Initializes the cached addresses of node arrays and their containing nodes from their size. * * @param flatNodes the list of node arrays. - * @param formatOptions file format options. * @return the byte size of the entire stack. */ - private static int initializePtNodeArraysCachedAddresses(final ArrayList<PtNodeArray> flatNodes, - final FormatOptions formatOptions) { + private static int initializePtNodeArraysCachedAddresses( + final ArrayList<PtNodeArray> flatNodes) { int nodeArrayOffset = 0; for (final PtNodeArray nodeArray : flatNodes) { nodeArray.mCachedAddressBeforeUpdate = nodeArrayOffset; @@ -468,28 +439,6 @@ public class BinaryDictEncoderUtils { } /** - * Compute the cached parent addresses after all has been updated. - * - * The parent addresses are used by some binary formats at write-to-disk time. Not all formats - * need them. In particular, version 2 does not need them, and version 3 does. - * - * @param flatNodes the flat array of node arrays to fill in - */ - private static void computeParentAddresses(final ArrayList<PtNodeArray> flatNodes) { - for (final PtNodeArray nodeArray : flatNodes) { - for (final PtNode ptNode : nodeArray.mData) { - if (null != ptNode.mChildren) { - // Assign my address to children's parent address - // Here BeforeUpdate and AfterUpdate addresses have the same value, so it - // does not matter which we use. - ptNode.mChildren.mCachedParentAddress = ptNode.mCachedAddressAfterUpdate - - ptNode.mChildren.mCachedAddressAfterUpdate; - } - } - } - } - - /** * Compute the addresses and sizes of an ordered list of PtNode arrays. * * This method takes a list of PtNode arrays and will update their cached address and size @@ -501,14 +450,15 @@ public class BinaryDictEncoderUtils { * * @param dict the dictionary * @param flatNodes the ordered list of PtNode arrays - * @param formatOptions file format options. * @return the same array it was passed. The nodes have been updated for address and size. */ /* package */ static ArrayList<PtNodeArray> computeAddresses(final FusionDictionary dict, - final ArrayList<PtNodeArray> flatNodes, final FormatOptions formatOptions) { + final ArrayList<PtNodeArray> flatNodes) { // First get the worst possible sizes and offsets - for (final PtNodeArray n : flatNodes) calculatePtNodeArrayMaximumSize(n, formatOptions); - final int offset = initializePtNodeArraysCachedAddresses(flatNodes, formatOptions); + for (final PtNodeArray n : flatNodes) { + calculatePtNodeArrayMaximumSize(n); + } + final int offset = initializePtNodeArraysCachedAddresses(flatNodes); MakedictLog.i("Compressing the array addresses. Original size : " + offset); MakedictLog.i("(Recursively seen size : " + offset + ")"); @@ -521,8 +471,7 @@ public class BinaryDictEncoderUtils { for (final PtNodeArray ptNodeArray : flatNodes) { ptNodeArray.mCachedAddressAfterUpdate = ptNodeArrayStartOffset; final int oldNodeArraySize = ptNodeArray.mCachedSize; - final boolean changed = - computeActualPtNodeArraySize(ptNodeArray, dict, formatOptions); + final boolean changed = computeActualPtNodeArraySize(ptNodeArray, dict); final int newNodeArraySize = ptNodeArray.mCachedSize; if (oldNodeArraySize < newNodeArraySize) { throw new RuntimeException("Increased size ?!"); @@ -535,9 +484,6 @@ public class BinaryDictEncoderUtils { if (passes > MAX_PASSES) throw new RuntimeException("Too many passes - probably a bug"); } while (changesDone); - if (formatOptions.supportsDynamicUpdate()) { - computeParentAddresses(flatNodes); - } final PtNodeArray lastPtNodeArray = flatNodes.get(flatNodes.size() - 1); MakedictLog.i("Compression complete in " + passes + " passes."); MakedictLog.i("After address compression : " @@ -634,35 +580,29 @@ public class BinaryDictEncoderUtils { * @param hasBigrams whether the PtNode has bigrams. * @param isNotAWord whether the PtNode is not a word. * @param isBlackListEntry whether the PtNode is a blacklist entry. - * @param formatOptions file format options. * @return the flags */ static int makePtNodeFlags(final boolean hasMultipleChars, final boolean isTerminal, final int childrenAddressSize, final boolean hasShortcuts, final boolean hasBigrams, - final boolean isNotAWord, final boolean isBlackListEntry, - final FormatOptions formatOptions) { + final boolean isNotAWord, final boolean isBlackListEntry) { byte flags = 0; if (hasMultipleChars) flags |= FormatSpec.FLAG_HAS_MULTIPLE_CHARS; if (isTerminal) flags |= FormatSpec.FLAG_IS_TERMINAL; - if (formatOptions.supportsDynamicUpdate()) { - flags |= FormatSpec.FLAG_IS_NOT_MOVED; - } else if (true) { - switch (childrenAddressSize) { - case 1: - flags |= FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_ONEBYTE; - break; - case 2: - flags |= FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_TWOBYTES; - break; - case 3: - flags |= FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_THREEBYTES; - break; - case 0: - flags |= FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_NOADDRESS; - break; - default: - throw new RuntimeException("Node with a strange address"); - } + switch (childrenAddressSize) { + case 1: + flags |= FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_ONEBYTE; + break; + case 2: + flags |= FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_TWOBYTES; + break; + case 3: + flags |= FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_THREEBYTES; + break; + case 0: + flags |= FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_NOADDRESS; + break; + default: + throw new RuntimeException("Node with a strange address"); } if (hasShortcuts) flags |= FormatSpec.FLAG_HAS_SHORTCUT_TARGETS; if (hasBigrams) flags |= FormatSpec.FLAG_HAS_BIGRAMS; @@ -671,12 +611,12 @@ public class BinaryDictEncoderUtils { return flags; } - /* package */ static byte makePtNodeFlags(final PtNode node, final int childrenOffset, - final FormatOptions formatOptions) { + /* package */ static byte makePtNodeFlags(final PtNode node, final int childrenOffset) { return (byte) makePtNodeFlags(node.mChars.length > 1, node.isTerminal(), getByteSize(childrenOffset), node.mShortcutTargets != null && !node.mShortcutTargets.isEmpty(), - node.mBigrams != null, node.mIsNotAWord, node.mIsBlacklistEntry, formatOptions); + node.mBigrams != null && !node.mBigrams.isEmpty(), + node.mIsNotAWord, node.mIsBlacklistEntry); } /** @@ -767,38 +707,14 @@ public class BinaryDictEncoderUtils { + (frequency & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY); } - /* package */ static final int writeParentAddress(final byte[] buffer, final int index, - final int address, final FormatOptions formatOptions) { - if (BinaryDictIOUtils.supportsDynamicUpdate(formatOptions)) { - if (address == FormatSpec.NO_PARENT_ADDRESS) { - buffer[index] = buffer[index + 1] = buffer[index + 2] = 0; - } else { - final int absAddress = Math.abs(address); - assert(absAddress <= FormatSpec.SINT24_MAX); - buffer[index] = (byte)((address < 0 ? FormatSpec.MSB8 : 0) - | ((absAddress >> 16) & 0xFF)); - buffer[index + 1] = (byte)((absAddress >> 8) & 0xFF); - buffer[index + 2] = (byte)(absAddress & 0xFF); - } - return index + 3; - } else { - return index; - } - } - - /* package */ static final int getChildrenPosition(final PtNode ptNode, - final FormatOptions formatOptions) { + /* package */ static final int getChildrenPosition(final PtNode ptNode) { int positionOfChildrenPosField = ptNode.mCachedAddressAfterUpdate - + getNodeHeaderSize(ptNode, formatOptions); + + getNodeHeaderSize(ptNode); if (ptNode.isTerminal()) { - // A terminal node has either the terminal id or the frequency. + // A terminal node has the frequency. // If positionOfChildrenPosField is incorrect, we may crash when jumping to the children // position. - if (formatOptions.mHasTerminalId) { - positionOfChildrenPosField += FormatSpec.PTNODE_TERMINAL_ID_SIZE; - } else { - positionOfChildrenPosField += FormatSpec.PTNODE_FREQUENCY_SIZE; - } + positionOfChildrenPosField += FormatSpec.PTNODE_FREQUENCY_SIZE; } return null == ptNode.mChildren ? FormatSpec.NO_CHILDREN_ADDRESS : ptNode.mChildren.mCachedAddressAfterUpdate - positionOfChildrenPosField; @@ -810,12 +726,10 @@ public class BinaryDictEncoderUtils { * @param dict the dictionary the node array is a part of (for relative offsets). * @param dictEncoder the dictionary encoder. * @param ptNodeArray the node array to write. - * @param formatOptions file format options. */ @SuppressWarnings("unused") /* package */ static void writePlacedPtNodeArray(final FusionDictionary dict, - final DictEncoder dictEncoder, final PtNodeArray ptNodeArray, - final FormatOptions formatOptions) { + final DictEncoder dictEncoder, final PtNodeArray ptNodeArray) { // TODO: Make the code in common with BinaryDictIOUtils#writePtNode dictEncoder.setPosition(ptNodeArray.mCachedAddressAfterUpdate); @@ -838,10 +752,7 @@ public class BinaryDictEncoderUtils { + FormatSpec.MAX_TERMINAL_FREQUENCY + " : " + ptNode.mProbabilityInfo.toString()); } - dictEncoder.writePtNode(ptNode, parentPosition, formatOptions, dict); - } - if (formatOptions.supportsDynamicUpdate()) { - dictEncoder.writeForwardLinkAddress(FormatSpec.NO_FORWARD_LINK_ADDRESS); + dictEncoder.writePtNode(ptNode, dict); } if (dictEncoder.getPosition() != ptNodeArray.mCachedAddressAfterUpdate + ptNodeArray.mCachedSize) { diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java index 54446df49..989ca4b2f 100644 --- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java +++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java @@ -18,7 +18,6 @@ package com.android.inputmethod.latin.makedict; import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.latin.Constants; -import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding; import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.DictBuffer; import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; import com.android.inputmethod.latin.utils.ByteArrayDictBuffer; @@ -60,8 +59,7 @@ public final class BinaryDictIOUtils { private static void readUnigramsAndBigramsBinaryInner(final DictDecoder dictDecoder, final int bodyOffset, final Map<Integer, String> words, final Map<Integer, Integer> frequencies, - final Map<Integer, ArrayList<PendingAttribute>> bigrams, - final FormatOptions formatOptions) { + final Map<Integer, ArrayList<PendingAttribute>> bigrams) { int[] pushedChars = new int[FormatSpec.MAX_WORD_LENGTH + 1]; Stack<Position> stack = new Stack<Position>(); @@ -90,17 +88,12 @@ public final class BinaryDictIOUtils { stack.pop(); continue; } - final PtNodeInfo ptNodeInfo = dictDecoder.readPtNode(p.mAddress, formatOptions); + final PtNodeInfo ptNodeInfo = dictDecoder.readPtNode(p.mAddress); for (int i = 0; i < ptNodeInfo.mCharacters.length; ++i) { pushedChars[index++] = ptNodeInfo.mCharacters[i]; } p.mPosition++; - - final boolean isMovedPtNode = isMovedPtNode(ptNodeInfo.mFlags, - formatOptions); - final boolean isDeletedPtNode = isDeletedPtNode(ptNodeInfo.mFlags, - formatOptions); - if (!isMovedPtNode && !isDeletedPtNode && ptNodeInfo.isTerminal()) {// found word + if (ptNodeInfo.isTerminal()) {// found word words.put(ptNodeInfo.mOriginalAddress, new String(pushedChars, 0, index)); frequencies.put( ptNodeInfo.mOriginalAddress, ptNodeInfo.mProbabilityInfo.mProbability); @@ -110,25 +103,13 @@ public final class BinaryDictIOUtils { } if (p.mPosition == p.mNumOfPtNode) { - if (formatOptions.supportsDynamicUpdate()) { - final boolean hasValidForwardLinkAddress = - dictDecoder.readAndFollowForwardLink(); - if (hasValidForwardLinkAddress && dictDecoder.hasNextPtNodeArray()) { - // The node array has a forward link. - p.mNumOfPtNode = Position.NOT_READ_PTNODE_COUNT; - p.mAddress = dictDecoder.getPosition(); - } else { - stack.pop(); - } - } else { - stack.pop(); - } + stack.pop(); } else { - // The Ptnode array has more PtNodes. + // The PtNode array has more PtNodes. p.mAddress = dictDecoder.getPosition(); } - if (!isMovedPtNode && hasChildrenAddress(ptNodeInfo.mChildrenAddress)) { + if (hasChildrenAddress(ptNodeInfo.mChildrenAddress)) { final Position childrenPos = new Position(ptNodeInfo.mChildrenAddress, index); stack.push(childrenPos); } @@ -153,7 +134,7 @@ public final class BinaryDictIOUtils { // Read header final DictionaryHeader header = dictDecoder.readHeader(); readUnigramsAndBigramsBinaryInner(dictDecoder, header.mBodyOffset, words, - frequencies, bigrams, header.mFormatOptions); + frequencies, bigrams); } /** @@ -171,8 +152,7 @@ public final class BinaryDictIOUtils { final String word) throws IOException, UnsupportedFormatException { if (word == null) return FormatSpec.NOT_VALID_WORD; dictDecoder.setPosition(0); - - final DictionaryHeader header = dictDecoder.readHeader(); + dictDecoder.readHeader(); int wordPos = 0; final int wordLen = word.codePointCount(0, word.length()); for (int depth = 0; depth < Constants.DICTIONARY_MAX_WORD_LENGTH; ++depth) { @@ -183,13 +163,7 @@ public final class BinaryDictIOUtils { boolean foundNextPtNode = false; for (int i = 0; i < ptNodeCount; ++i) { final int ptNodePos = dictDecoder.getPosition(); - final PtNodeInfo currentInfo = dictDecoder.readPtNode(ptNodePos, - header.mFormatOptions); - final boolean isMovedNode = isMovedPtNode(currentInfo.mFlags, - header.mFormatOptions); - final boolean isDeletedNode = isDeletedPtNode(currentInfo.mFlags, - header.mFormatOptions); - if (isMovedNode) continue; + final PtNodeInfo currentInfo = dictDecoder.readPtNode(ptNodePos); boolean same = true; for (int p = 0, j = word.offsetByCodePoints(0, wordPos); p < currentInfo.mCharacters.length; @@ -204,7 +178,7 @@ public final class BinaryDictIOUtils { if (same) { // found the PtNode matches the word. if (wordPos + currentInfo.mCharacters.length == wordLen) { - if (!currentInfo.isTerminal() || isDeletedNode) { + if (!currentInfo.isTerminal()) { return FormatSpec.NOT_VALID_WORD; } else { return ptNodePos; @@ -219,65 +193,14 @@ public final class BinaryDictIOUtils { break; } } - - // If we found the next PtNode, it is under the file pointer. - // But if not, we are at the end of this node array so we expect to have - // a forward link address that we need to consult and possibly resume - // search on the next node array in the linked list. if (foundNextPtNode) break; - if (!header.mFormatOptions.supportsDynamicUpdate()) { - return FormatSpec.NOT_VALID_WORD; - } - - final boolean hasValidForwardLinkAddress = - dictDecoder.readAndFollowForwardLink(); - if (!hasValidForwardLinkAddress || !dictDecoder.hasNextPtNodeArray()) { - return FormatSpec.NOT_VALID_WORD; - } + return FormatSpec.NOT_VALID_WORD; } while(true); } return FormatSpec.NOT_VALID_WORD; } /** - * @return the size written, in bytes. Always 3 bytes. - */ - @UsedForTesting - static int writeSInt24ToBuffer(final DictBuffer dictBuffer, final int value) { - final int absValue = Math.abs(value); - dictBuffer.put((byte)(((value < 0 ? 0x80 : 0) | (absValue >> 16)) & 0xFF)); - dictBuffer.put((byte)((absValue >> 8) & 0xFF)); - dictBuffer.put((byte)(absValue & 0xFF)); - return 3; - } - - /** - * @return the size written, in bytes. Always 3 bytes. - */ - @UsedForTesting - static int writeSInt24ToStream(final OutputStream destination, final int value) - throws IOException { - final int absValue = Math.abs(value); - destination.write((byte)(((value < 0 ? 0x80 : 0) | (absValue >> 16)) & 0xFF)); - destination.write((byte)((absValue >> 8) & 0xFF)); - destination.write((byte)(absValue & 0xFF)); - return 3; - } - - @UsedForTesting - static void skipString(final DictBuffer dictBuffer, - final boolean hasMultipleChars) { - if (hasMultipleChars) { - int character = CharEncoding.readChar(dictBuffer); - while (character != FormatSpec.INVALID_CHARACTER) { - character = CharEncoding.readChar(dictBuffer); - } - } else { - CharEncoding.readChar(dictBuffer); - } - } - - /** * Writes a PtNodeCount to the stream. * * @param destination the stream to write. @@ -356,30 +279,6 @@ public final class BinaryDictIOUtils { } /** - * Helper method to check whether the node is moved. - */ - public static boolean isMovedPtNode(final int flags, final FormatOptions options) { - return options.supportsDynamicUpdate() - && ((flags & FormatSpec.MASK_CHILDREN_ADDRESS_TYPE) == FormatSpec.FLAG_IS_MOVED); - } - - /** - * Helper method to check whether the dictionary can be updated dynamically. - */ - public static boolean supportsDynamicUpdate(final FormatOptions options) { - return options.mVersion >= FormatSpec.FIRST_VERSION_WITH_DYNAMIC_UPDATE - && options.supportsDynamicUpdate(); - } - - /** - * Helper method to check whether the node is deleted. - */ - public static boolean isDeletedPtNode(final int flags, final FormatOptions formatOptions) { - return formatOptions.supportsDynamicUpdate() - && ((flags & FormatSpec.MASK_CHILDREN_ADDRESS_TYPE) == FormatSpec.FLAG_IS_DELETED); - } - - /** * Compute the binary size of the node count * @param count the node count * @return the size of the node count, either 1 or 2 bytes. @@ -396,9 +295,7 @@ public final class BinaryDictIOUtils { } } - static int getChildrenAddressSize(final int optionFlags, - final FormatOptions formatOptions) { - if (formatOptions.supportsDynamicUpdate()) return FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE; + static int getChildrenAddressSize(final int optionFlags) { switch (optionFlags & FormatSpec.MASK_CHILDREN_ADDRESS_TYPE) { case FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_ONEBYTE: return 1; @@ -419,6 +316,7 @@ public final class BinaryDictIOUtils { * @param bigramFrequency compressed frequency * @return approximate bigram frequency */ + @UsedForTesting public static int reconstructBigramFrequency(final int unigramFrequency, final int bigramFrequency) { final float stepSize = (FormatSpec.MAX_TERMINAL_FREQUENCY - unigramFrequency) diff --git a/java/src/com/android/inputmethod/latin/makedict/DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/DictDecoder.java index a93a8bbad..a3b28a702 100644 --- a/java/src/com/android/inputmethod/latin/makedict/DictDecoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/DictDecoder.java @@ -18,7 +18,6 @@ package com.android.inputmethod.latin.makedict; import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.DictBuffer; -import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; import com.android.inputmethod.latin.utils.ByteArrayDictBuffer; import java.io.File; @@ -45,27 +44,23 @@ public interface DictDecoder { /** * Reads PtNode from ptNodePos. * @param ptNodePos the position of PtNode. - * @param formatOptions the format options. * @return PtNodeInfo. */ - public PtNodeInfo readPtNode(final int ptNodePos, final FormatOptions formatOptions); + public PtNodeInfo readPtNode(final int ptNodePos); /** * Reads a buffer and returns the memory representation of the dictionary. * * This high-level method takes a buffer and reads its contents, populating a - * FusionDictionary structure. The optional dict argument is an existing dictionary to - * which words from the buffer should be added. If it is null, a new dictionary is created. + * FusionDictionary structure. * - * @param dict an optional dictionary to add words to, or null. * @param deleteDictIfBroken a flag indicating whether this method should remove the broken * dictionary or not. - * @return the created (or merged) dictionary. + * @return the created dictionary. */ @UsedForTesting - public FusionDictionary readDictionaryBinary(final FusionDictionary dict, - final boolean deleteDictIfBroken) - throws FileNotFoundException, IOException, UnsupportedFormatException; + public FusionDictionary readDictionaryBinary(final boolean deleteDictIfBroken) + throws FileNotFoundException, IOException, UnsupportedFormatException; /** * Gets the address of the last PtNode of the exact matching word in the dictionary. @@ -116,14 +111,6 @@ public interface DictDecoder { public int readPtNodeCount(); /** - * Reads the forward link and advances the position. - * - * @return true if this method moves the file pointer, false otherwise. - */ - public boolean readAndFollowForwardLink(); - public boolean hasNextPtNodeArray(); - - /** * Opens the dictionary file and makes DictBuffer. */ @UsedForTesting diff --git a/java/src/com/android/inputmethod/latin/makedict/DictEncoder.java b/java/src/com/android/inputmethod/latin/makedict/DictEncoder.java index ea5d492d8..a5dc45691 100644 --- a/java/src/com/android/inputmethod/latin/makedict/DictEncoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/DictEncoder.java @@ -32,7 +32,5 @@ public interface DictEncoder { public int getPosition(); public void writePtNodeCount(final int ptNodeCount); public void writeForwardLinkAddress(final int forwardLinkAddress); - - public void writePtNode(final PtNode ptNode, final int parentPosition, - final FormatOptions formatOptions, final FusionDictionary dict); + public void writePtNode(final PtNode ptNode, final FusionDictionary dict); } diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java index 5a3807389..c7635eff9 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java +++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java @@ -309,7 +309,6 @@ public final class FormatSpec { */ public static final class FormatOptions { public final int mVersion; - public final boolean mHasTerminalId; public final boolean mHasTimestamp; @UsedForTesting @@ -319,13 +318,8 @@ public final class FormatSpec { public FormatOptions(final int version, final boolean hasTimestamp) { mVersion = version; - mHasTerminalId = (version >= FIRST_VERSION_WITH_TERMINAL_ID); mHasTimestamp = hasTimestamp; } - - public boolean supportsDynamicUpdate() { - return mVersion >= FIRST_VERSION_WITH_DYNAMIC_UPDATE; - } } /** diff --git a/java/src/com/android/inputmethod/latin/makedict/PtNodeInfo.java b/java/src/com/android/inputmethod/latin/makedict/PtNodeInfo.java index 4760aa8d5..f52117c6c 100644 --- a/java/src/com/android/inputmethod/latin/makedict/PtNodeInfo.java +++ b/java/src/com/android/inputmethod/latin/makedict/PtNodeInfo.java @@ -31,12 +31,11 @@ public final class PtNodeInfo { public final int[] mCharacters; public final ProbabilityInfo mProbabilityInfo; public final int mChildrenAddress; - public final int mParentAddress; public final ArrayList<WeightedString> mShortcutTargets; public final ArrayList<PendingAttribute> mBigrams; public PtNodeInfo(final int originalAddress, final int endAddress, final int flags, - final int[] characters, final ProbabilityInfo probabilityInfo, final int parentAddress, + final int[] characters, final ProbabilityInfo probabilityInfo, final int childrenAddress, final ArrayList<WeightedString> shortcutTargets, final ArrayList<PendingAttribute> bigrams) { mOriginalAddress = originalAddress; @@ -44,7 +43,6 @@ public final class PtNodeInfo { mFlags = flags; mCharacters = characters; mProbabilityInfo = probabilityInfo; - mParentAddress = parentAddress; mChildrenAddress = childrenAddress; mShortcutTargets = shortcutTargets; mBigrams = bigrams; diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java index fd6138d41..315bd8e58 100644 --- a/java/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java @@ -17,12 +17,11 @@ package com.android.inputmethod.latin.makedict; import com.android.inputmethod.annotations.UsedForTesting; +import com.android.inputmethod.latin.BinaryDictionary; import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding; import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.DictBuffer; -import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; - -import android.util.Log; +import com.android.inputmethod.latin.utils.CollectionUtils; import java.io.File; import java.io.FileNotFoundException; @@ -33,6 +32,7 @@ import java.util.Arrays; /** * An implementation of DictDecoder for version 2 binary dictionary. */ +// TODO: Separate logics that are used only for testing. @UsedForTesting public class Ver2DictDecoder extends AbstractDictDecoder { private static final String TAG = Ver2DictDecoder.class.getSimpleName(); @@ -116,12 +116,19 @@ public class Ver2DictDecoder extends AbstractDictDecoder { } protected final File mDictionaryBinaryFile; + // TODO: Remove mBufferFactory and mDictBuffer from this class members because they are now + // used only for testing. private final DictionaryBufferFactory mBufferFactory; protected DictBuffer mDictBuffer; + private final BinaryDictionary mBinaryDictionary; /* package */ Ver2DictDecoder(final File file, final int factoryFlag) { mDictionaryBinaryFile = file; mDictBuffer = null; + // dictType is not being used in dicttool. Passing an empty string. + mBinaryDictionary = new BinaryDictionary(file.getAbsolutePath(), + 0 /* offset */, file.length() /* length */, true /* useFullEditDistance */, + null /* locale */, "" /* dictType */, false /* isUpdatable */); if ((factoryFlag & MASK_DICTBUFFER) == USE_READONLY_BYTEBUFFER) { mBufferFactory = new DictionaryBufferFromReadOnlyByteBufferFactory(); @@ -137,6 +144,10 @@ public class Ver2DictDecoder extends AbstractDictDecoder { /* package */ Ver2DictDecoder(final File file, final DictionaryBufferFactory factory) { mDictionaryBinaryFile = file; mBufferFactory = factory; + // dictType is not being used in dicttool. Passing an empty string. + mBinaryDictionary = new BinaryDictionary(file.getAbsolutePath(), + 0 /* offset */, file.length() /* length */, true /* useFullEditDistance */, + null /* locale */, "" /* dictType */, false /* isUpdatable */); } @Override @@ -161,21 +172,23 @@ public class Ver2DictDecoder extends AbstractDictDecoder { @Override public DictionaryHeader readHeader() throws IOException, UnsupportedFormatException { - if (mDictBuffer == null) { - openDictBuffer(); + final DictionaryHeader header = mBinaryDictionary.getHeader(); + if (header.mFormatOptions.mVersion != FormatSpec.VERSION2) { + throw new UnsupportedFormatException("File header has a wrong version : " + + header.mFormatOptions.mVersion); } - final DictionaryHeader header = super.readHeader(mDictBuffer); - final int version = header.mFormatOptions.mVersion; - if (version != FormatSpec.VERSION2) { - throw new UnsupportedFormatException("File header has a wrong version : " + version); + if (!isDictBufferOpen()) { + openDictBuffer(); } + // Advance buffer reading position to the head of dictionary body. + setPosition(header.mBodyOffset); return header; } // TODO: Make this buffer multi thread safe. private final int[] mCharacterBuffer = new int[FormatSpec.MAX_WORD_LENGTH]; @Override - public PtNodeInfo readPtNode(final int ptNodePos, final FormatOptions options) { + public PtNodeInfo readPtNode(final int ptNodePos) { int addressPointer = ptNodePos; final int flags = PtNodeReader.readPtNodeOptionFlags(mDictBuffer); addressPointer += FormatSpec.PTNODE_FLAGS_SIZE; @@ -209,7 +222,7 @@ public class Ver2DictDecoder extends AbstractDictDecoder { if (childrenAddress != FormatSpec.NO_CHILDREN_ADDRESS) { childrenAddress += addressPointer; } - addressPointer += BinaryDictIOUtils.getChildrenAddressSize(flags, options); + addressPointer += BinaryDictIOUtils.getChildrenAddressSize(flags); final ArrayList<WeightedString> shortcutTargets; if (0 != (flags & FormatSpec.FLAG_HAS_SHORTCUT_TARGETS)) { // readShortcut will add shortcuts to shortcutTargets. @@ -232,31 +245,53 @@ public class Ver2DictDecoder extends AbstractDictDecoder { bigrams = null; } return new PtNodeInfo(ptNodePos, addressPointer, flags, characters, probabilityInfo, - FormatSpec.NO_PARENT_ADDRESS, childrenAddress, shortcutTargets, bigrams); + childrenAddress, shortcutTargets, bigrams); } @Override - public FusionDictionary readDictionaryBinary(final FusionDictionary dict, - final boolean deleteDictIfBroken) + public FusionDictionary readDictionaryBinary(final boolean deleteDictIfBroken) throws FileNotFoundException, IOException, UnsupportedFormatException { - if (mDictBuffer == null) { - openDictBuffer(); + final DictionaryHeader header = readHeader(); + final FusionDictionary fusionDict = + new FusionDictionary(new FusionDictionary.PtNodeArray(), header.mDictionaryOptions); + int token = 0; + final ArrayList<WordProperty> wordProperties = CollectionUtils.newArrayList(); + do { + final BinaryDictionary.GetNextWordPropertyResult result = + mBinaryDictionary.getNextWordProperty(token); + final WordProperty wordProperty = result.mWordProperty; + if (wordProperty == null) { + if (deleteDictIfBroken) { + mBinaryDictionary.close(); + mDictionaryBinaryFile.delete(); + } + return null; + } + wordProperties.add(wordProperty); + token = result.mNextToken; + } while (token != 0); + + // Insert unigrams into the fusion dictionary. + for (final WordProperty wordProperty : wordProperties) { + if (wordProperty.mIsBlacklistEntry) { + fusionDict.addBlacklistEntry(wordProperty.mWord, wordProperty.mShortcutTargets, + wordProperty.mIsNotAWord); + } else { + fusionDict.add(wordProperty.mWord, wordProperty.mProbabilityInfo, + wordProperty.mShortcutTargets, wordProperty.mIsNotAWord); + } } - try { - return BinaryDictDecoderUtils.readDictionaryBinary(this, dict); - } catch (IOException e) { - Log.e(TAG, "The dictionary " + mDictionaryBinaryFile.getName() + " is broken.", e); - if (deleteDictIfBroken && !mDictionaryBinaryFile.delete()) { - Log.e(TAG, "Failed to delete the broken dictionary."); + // Insert bigrams into the fusion dictionary. + for (final WordProperty wordProperty : wordProperties) { + if (wordProperty.mBigrams == null) { + continue; } - throw e; - } catch (UnsupportedFormatException e) { - Log.e(TAG, "The dictionary " + mDictionaryBinaryFile.getName() + " is broken.", e); - if (deleteDictIfBroken && !mDictionaryBinaryFile.delete()) { - Log.e(TAG, "Failed to delete the broken dictionary."); + final String word0 = wordProperty.mWord; + for (final WeightedString bigram : wordProperty.mBigrams) { + fusionDict.setBigram(word0, bigram.mWord, bigram.mProbabilityInfo); } - throw e; } + return fusionDict; } @Override @@ -273,19 +308,4 @@ public class Ver2DictDecoder extends AbstractDictDecoder { public int readPtNodeCount() { return BinaryDictDecoderUtils.readPtNodeCount(mDictBuffer); } - - @Override - public boolean readAndFollowForwardLink() { - final int nextAddress = mDictBuffer.readUnsignedInt24(); - if (nextAddress >= 0 && nextAddress < mDictBuffer.limit()) { - mDictBuffer.position(nextAddress); - return true; - } - return false; - } - - @Override - public boolean hasNextPtNodeArray() { - return mDictBuffer.position() != FormatSpec.NO_FORWARD_LINK_ADDRESS; - } } diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java index 634f63137..e247f0121 100644 --- a/java/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java @@ -95,7 +95,7 @@ public class Ver2DictEncoder implements DictEncoder { ArrayList<PtNodeArray> flatNodes = BinaryDictEncoderUtils.flattenTree(dict.mRootNodeArray); MakedictLog.i("Computing addresses..."); - BinaryDictEncoderUtils.computeAddresses(dict, flatNodes, formatOptions); + BinaryDictEncoderUtils.computeAddresses(dict, flatNodes); MakedictLog.i("Checking PtNode array..."); if (MakedictLog.DBG) BinaryDictEncoderUtils.checkFlatPtNodeArrayList(flatNodes); @@ -107,7 +107,7 @@ public class Ver2DictEncoder implements DictEncoder { MakedictLog.i("Writing file..."); for (PtNodeArray nodeArray : flatNodes) { - BinaryDictEncoderUtils.writePlacedPtNodeArray(dict, this, nodeArray, formatOptions); + BinaryDictEncoderUtils.writePlacedPtNodeArray(dict, this, nodeArray); } if (MakedictLog.DBG) BinaryDictEncoderUtils.showStatistics(flatNodes); mOutStream.write(mBuffer, 0, mPosition); @@ -139,24 +139,13 @@ public class Ver2DictEncoder implements DictEncoder { countSize); } - private void writePtNodeFlags(final PtNode ptNode, final FormatOptions formatOptions) { - final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(ptNode, formatOptions); + private void writePtNodeFlags(final PtNode ptNode) { + final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(ptNode); mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, - BinaryDictEncoderUtils.makePtNodeFlags(ptNode, childrenPos, formatOptions), + BinaryDictEncoderUtils.makePtNodeFlags(ptNode, childrenPos), FormatSpec.PTNODE_FLAGS_SIZE); } - private void writeParentPosition(final int parentPosition, final PtNode ptNode, - final FormatOptions formatOptions) { - if (parentPosition == FormatSpec.NO_PARENT_ADDRESS) { - mPosition = BinaryDictEncoderUtils.writeParentAddress(mBuffer, mPosition, - parentPosition, formatOptions); - } else { - mPosition = BinaryDictEncoderUtils.writeParentAddress(mBuffer, mPosition, - parentPosition - ptNode.mCachedAddressAfterUpdate, formatOptions); - } - } - private void writeCharacters(final int[] codePoints, final boolean hasSeveralChars) { mPosition = CharEncoding.writeCharArray(codePoints, mBuffer, mPosition); if (hasSeveralChars) { @@ -171,15 +160,10 @@ public class Ver2DictEncoder implements DictEncoder { } } - private void writeChildrenPosition(final PtNode ptNode, final FormatOptions formatOptions) { - final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(ptNode, formatOptions); - if (formatOptions.supportsDynamicUpdate()) { - mPosition += BinaryDictEncoderUtils.writeSignedChildrenPosition(mBuffer, mPosition, - childrenPos); - } else { - mPosition += BinaryDictEncoderUtils.writeChildrenPosition(mBuffer, mPosition, - childrenPos); - } + private void writeChildrenPosition(final PtNode ptNode) { + final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(ptNode); + mPosition += BinaryDictEncoderUtils.writeChildrenPosition(mBuffer, mPosition, + childrenPos); } /** @@ -246,13 +230,11 @@ public class Ver2DictEncoder implements DictEncoder { } @Override - public void writePtNode(final PtNode ptNode, final int parentPosition, - final FormatOptions formatOptions, final FusionDictionary dict) { - writePtNodeFlags(ptNode, formatOptions); - writeParentPosition(parentPosition, ptNode, formatOptions); + public void writePtNode(final PtNode ptNode, final FusionDictionary dict) { + writePtNodeFlags(ptNode); writeCharacters(ptNode.mChars, ptNode.hasSeveralChars()); writeFrequency(ptNode.getProbability()); - writeChildrenPosition(ptNode, formatOptions); + writeChildrenPosition(ptNode); writeShortcuts(ptNode.mShortcutTargets); writeBigrams(ptNode.mBigrams, dict); } diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java index 1c74852fe..23aa05d18 100644 --- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java @@ -45,6 +45,7 @@ public class Ver4DictDecoder extends AbstractDictDecoder { @UsedForTesting /* package */ Ver4DictDecoder(final File dictDirectory, final DictionaryBufferFactory factory) { mDictDirectory = dictDirectory; + // dictType is not being used in dicttool. Passing an empty string. mBinaryDictionary = new BinaryDictionary(dictDirectory.getAbsolutePath(), 0 /* offset */, 0 /* length */, true /* useFullEditDistance */, null /* locale */, "" /* dictType */, true /* isUpdatable */); @@ -56,11 +57,10 @@ public class Ver4DictDecoder extends AbstractDictDecoder { } @Override - public FusionDictionary readDictionaryBinary(final FusionDictionary dict, - final boolean deleteDictIfBroken) + public FusionDictionary readDictionaryBinary(final boolean deleteDictIfBroken) throws FileNotFoundException, IOException, UnsupportedFormatException { final DictionaryHeader header = readHeader(); - final FusionDictionary fusionDict = dict != null ? dict : + final FusionDictionary fusionDict = new FusionDictionary(new FusionDictionary.PtNodeArray(), header.mDictionaryOptions); int token = 0; final ArrayList<WordProperty> wordProperties = CollectionUtils.newArrayList(); @@ -79,7 +79,7 @@ public class Ver4DictDecoder extends AbstractDictDecoder { token = result.mNextToken; } while (token != 0); - // Insert unigrams to the fusion dictionary. + // Insert unigrams into the fusion dictionary. for (final WordProperty wordProperty : wordProperties) { if (wordProperty.mIsBlacklistEntry) { fusionDict.addBlacklistEntry(wordProperty.mWord, wordProperty.mShortcutTargets, @@ -89,7 +89,7 @@ public class Ver4DictDecoder extends AbstractDictDecoder { wordProperty.mShortcutTargets, wordProperty.mIsNotAWord); } } - // Insert bigrams to the fusion dictionary. + // Insert bigrams into the fusion dictionary. for (final WordProperty wordProperty : wordProperties) { if (wordProperty.mBigrams == null) { continue; diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java index 147844fd8..1050d1b0e 100644 --- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java @@ -122,7 +122,6 @@ public class Ver4DictEncoder implements DictEncoder { } @Override - public void writePtNode( - PtNode ptNode, int parentPosition, FormatOptions formatOptions, FusionDictionary dict) { + public void writePtNode(PtNode ptNode, FusionDictionary dict) { } } diff --git a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java index 6a7a3368e..8f7378c58 100644 --- a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java +++ b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java @@ -51,22 +51,10 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB private final String mDictName; - /* package */ DecayingExpandableBinaryDictionaryBase(final Context context, - final Locale locale, final String dictionaryType, final String dictName) { - super(context, dictName, locale, dictionaryType, true); - mLocale = locale; - mDictName = dictName; - if (mLocale != null && mLocale.toString().length() > 1) { - reloadDictionaryIfRequired(); - } - } - - // Creates an instance that uses a given dictionary file for testing. - @UsedForTesting - /* package */ DecayingExpandableBinaryDictionaryBase(final Context context, - final Locale locale, final String dictionaryType, final String dictName, + protected DecayingExpandableBinaryDictionaryBase(final Context context, + final String dictName, final Locale locale, final String dictionaryType, final File dictFile) { - super(context, dictName, locale, dictionaryType, true, dictFile); + super(context, dictName, locale, dictionaryType, true /* isUpdatable */, dictFile); mLocale = locale; mDictName = dictName; if (mLocale != null && mLocale.toString().length() > 1) { diff --git a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionary.java b/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionary.java index 652614876..4afd5b4c9 100644 --- a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionary.java +++ b/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionary.java @@ -16,27 +16,23 @@ package com.android.inputmethod.latin.personalization; -import com.android.inputmethod.annotations.UsedForTesting; +import android.content.Context; + import com.android.inputmethod.latin.Dictionary; import java.io.File; import java.util.Locale; -import android.content.Context; - public class PersonalizationDictionary extends DecayingExpandableBinaryDictionaryBase { /* package */ static final String NAME = PersonalizationDictionary.class.getSimpleName(); /* package */ PersonalizationDictionary(final Context context, final Locale locale) { - super(context, locale, Dictionary.TYPE_PERSONALIZATION, - getDictNameWithLocale(NAME, locale)); + this(context, locale, null /* dictFile */); } - // Creates an instance that uses a given dictionary file for testing. - @UsedForTesting public PersonalizationDictionary(final Context context, final Locale locale, final File dictFile) { - super(context, locale, Dictionary.TYPE_PERSONALIZATION, getDictNameWithLocale(NAME, locale), + super(context, getDictName(NAME, locale, dictFile), locale, Dictionary.TYPE_PERSONALIZATION, dictFile); } diff --git a/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java b/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java index 6778c2334..504e9b2f3 100644 --- a/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java +++ b/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java @@ -16,29 +16,27 @@ package com.android.inputmethod.latin.personalization; -import com.android.inputmethod.annotations.UsedForTesting; +import android.content.Context; + import com.android.inputmethod.latin.Dictionary; import java.io.File; import java.util.Locale; -import android.content.Context; - /** * Locally gathers stats about the words user types and various other signals like auto-correction * cancellation or manual picks. This allows the keyboard to adapt to the typist over time. */ public class UserHistoryDictionary extends DecayingExpandableBinaryDictionaryBase { /* package */ static final String NAME = UserHistoryDictionary.class.getSimpleName(); + /* package */ UserHistoryDictionary(final Context context, final Locale locale) { - super(context, locale, Dictionary.TYPE_USER_HISTORY, getDictNameWithLocale(NAME, locale)); + this(context, locale, null /* dictFile */); } - // Creates an instance that uses a given dictionary file for testing. - @UsedForTesting public UserHistoryDictionary(final Context context, final Locale locale, final File dictFile) { - super(context, locale, Dictionary.TYPE_USER_HISTORY, getDictNameWithLocale(NAME, locale), + super(context, getDictName(NAME, locale, dictFile), locale, Dictionary.TYPE_USER_HISTORY, dictFile); } diff --git a/java/src/com/android/inputmethod/latin/settings/AdditionalSubtypeSettings.java b/java/src/com/android/inputmethod/latin/settings/AdditionalSubtypeSettings.java index 4bf524cbb..6dae6206c 100644 --- a/java/src/com/android/inputmethod/latin/settings/AdditionalSubtypeSettings.java +++ b/java/src/com/android/inputmethod/latin/settings/AdditionalSubtypeSettings.java @@ -16,8 +16,6 @@ package com.android.inputmethod.latin.settings; -import static com.android.inputmethod.latin.Constants.Subtype.ExtraValue.ASCII_CAPABLE; - import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; @@ -44,6 +42,8 @@ import android.widget.Spinner; import android.widget.SpinnerAdapter; import android.widget.Toast; +import com.android.inputmethod.compat.InputMethodSubtypeCompatUtils; +import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.RichInputMethodManager; import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils; @@ -111,7 +111,7 @@ public final class AdditionalSubtypeSettings extends PreferenceFragment { subtype.getLocale(), subtype.hashCode(), subtype.hashCode(), SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(subtype))); } - if (subtype.containsExtraValueKey(ASCII_CAPABLE)) { + if (InputMethodSubtypeCompatUtils.isAsciiCapable(subtype)) { items.add(createItem(context, subtype.getLocale())); } } @@ -287,7 +287,7 @@ public final class AdditionalSubtypeSettings extends PreferenceFragment { final KeyboardLayoutSetItem layout = (KeyboardLayoutSetItem) mKeyboardLayoutSetSpinner.getSelectedItem(); final InputMethodSubtype subtype = AdditionalSubtypeUtils.createAdditionalSubtype( - locale.first, layout.first, ASCII_CAPABLE); + locale.first, layout.first, Constants.Subtype.ExtraValue.ASCII_CAPABLE); setSubtype(subtype); notifyChanged(); if (isEditing) { diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java index 45c5b733f..b51c765f0 100644 --- a/java/src/com/android/inputmethod/latin/settings/Settings.java +++ b/java/src/com/android/inputmethod/latin/settings/Settings.java @@ -66,6 +66,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang "pref_include_other_imes_in_language_switch_list"; public static final String PREF_KEYBOARD_LAYOUT = "pref_keyboard_layout_20110916"; public static final String PREF_CUSTOM_INPUT_STYLES = "custom_input_styles"; + // TODO: consolidate key preview dismiss delay with the key preview animation parameters. public static final String PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY = "pref_key_preview_popup_dismiss_delay"; public static final String PREF_BIGRAM_PREDICTIONS = "next_word_prediction"; diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java index 67017a43b..bb5547fc9 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java @@ -169,6 +169,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment removePreference(Settings.PREF_VIBRATION_DURATION_SETTINGS, advancedSettings); } + // TODO: consolidate key preview dismiss delay with the key preview animation parameters. if (!Settings.readFromBuildConfigIfToShowKeyPreviewPopupOption(res)) { removePreference(Settings.PREF_POPUP_ON, generalSettings); removePreference(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY, advancedSettings); diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java index 90d3519a4..77968f79a 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java @@ -329,4 +329,86 @@ public final class SettingsValues { } return prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, true); } + + public String dump() { + final StringBuilder sb = new StringBuilder("Current settings :"); + sb.append("\n mSpacingAndPunctuations = "); + sb.append("" + mSpacingAndPunctuations.dump()); + sb.append("\n mDelayUpdateOldSuggestions = "); + sb.append("" + mDelayUpdateOldSuggestions); + sb.append("\n mAutoCap = "); + sb.append("" + mAutoCap); + sb.append("\n mVibrateOn = "); + sb.append("" + mVibrateOn); + sb.append("\n mSoundOn = "); + sb.append("" + mSoundOn); + sb.append("\n mKeyPreviewPopupOn = "); + sb.append("" + mKeyPreviewPopupOn); + sb.append("\n mShowsVoiceInputKey = "); + sb.append("" + mShowsVoiceInputKey); + sb.append("\n mIncludesOtherImesInLanguageSwitchList = "); + sb.append("" + mIncludesOtherImesInLanguageSwitchList); + sb.append("\n mShowsLanguageSwitchKey = "); + sb.append("" + mShowsLanguageSwitchKey); + sb.append("\n mUseContactsDict = "); + sb.append("" + mUseContactsDict); + sb.append("\n mUsePersonalizedDicts = "); + sb.append("" + mUsePersonalizedDicts); + sb.append("\n mUseDoubleSpacePeriod = "); + sb.append("" + mUseDoubleSpacePeriod); + sb.append("\n mBlockPotentiallyOffensive = "); + sb.append("" + mBlockPotentiallyOffensive); + sb.append("\n mBigramPredictionEnabled = "); + sb.append("" + mBigramPredictionEnabled); + sb.append("\n mGestureInputEnabled = "); + sb.append("" + mGestureInputEnabled); + sb.append("\n mGestureTrailEnabled = "); + sb.append("" + mGestureTrailEnabled); + sb.append("\n mGestureFloatingPreviewTextEnabled = "); + sb.append("" + mGestureFloatingPreviewTextEnabled); + sb.append("\n mSlidingKeyInputPreviewEnabled = "); + sb.append("" + mSlidingKeyInputPreviewEnabled); + sb.append("\n mPhraseGestureEnabled = "); + sb.append("" + mPhraseGestureEnabled); + sb.append("\n mKeyLongpressTimeout = "); + sb.append("" + mKeyLongpressTimeout); + sb.append("\n mLocale = "); + sb.append("" + mLocale); + sb.append("\n mInputAttributes = "); + sb.append("" + mInputAttributes); + sb.append("\n mKeypressVibrationDuration = "); + sb.append("" + mKeypressVibrationDuration); + sb.append("\n mKeypressSoundVolume = "); + sb.append("" + mKeypressSoundVolume); + sb.append("\n mKeyPreviewPopupDismissDelay = "); + sb.append("" + mKeyPreviewPopupDismissDelay); + sb.append("\n mAutoCorrectEnabled = "); + sb.append("" + mAutoCorrectEnabled); + sb.append("\n mAutoCorrectionThreshold = "); + sb.append("" + mAutoCorrectionThreshold); + sb.append("\n mCorrectionEnabled = "); + sb.append("" + mCorrectionEnabled); + sb.append("\n mSuggestionVisibility = "); + sb.append("" + mSuggestionVisibility); + sb.append("\n mUseOnlyPersonalizationDictionaryForDebug = "); + sb.append("" + mUseOnlyPersonalizationDictionaryForDebug); + sb.append("\n mDisplayOrientation = "); + sb.append("" + mDisplayOrientation); + sb.append("\n mAppWorkarounds = "); + final AppWorkaroundsUtils awu = mAppWorkarounds.get(null, 0); + sb.append("" + (null == awu ? "null" : awu.toString())); + sb.append("\n mAdditionalFeaturesSettingValues = "); + sb.append("" + Arrays.toString(mAdditionalFeaturesSettingValues)); + sb.append("\n mIsInternal = "); + sb.append("" + mIsInternal); + sb.append("\n mKeyPreviewShowUpDuration = "); + sb.append("" + mKeyPreviewShowUpDuration); + sb.append("\n mKeyPreviewDismissDuration = "); + sb.append("" + mKeyPreviewDismissDuration); + sb.append("\n mKeyPreviewShowUpStartScale = "); + sb.append("" + mKeyPreviewShowUpStartScale); + sb.append("\n mKeyPreviewDismissEndScale = "); + sb.append("" + mKeyPreviewDismissEndScale); + return sb.toString(); + } } diff --git a/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java b/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java index 60ca5baab..5954758aa 100644 --- a/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java +++ b/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java @@ -18,17 +18,13 @@ package com.android.inputmethod.latin.settings; import android.content.res.Resources; -import com.android.inputmethod.keyboard.internal.KeySpecParser; +import com.android.inputmethod.keyboard.internal.KeyboardTextsSet; import com.android.inputmethod.keyboard.internal.MoreKeySpec; import com.android.inputmethod.latin.Constants; -import com.android.inputmethod.latin.Dictionary; +import com.android.inputmethod.latin.PunctuationSuggestions; import com.android.inputmethod.latin.R; -import com.android.inputmethod.latin.SuggestedWords; -import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; -import com.android.inputmethod.latin.utils.CollectionUtils; import com.android.inputmethod.latin.utils.StringUtils; -import java.util.ArrayList; import java.util.Arrays; import java.util.Locale; @@ -37,7 +33,7 @@ public final class SpacingAndPunctuations { private final int[] mSortedSymbolsFollowedBySpace; private final int[] mSortedWordConnectors; public final int[] mSortedWordSeparators; - public final SuggestedWords mSuggestPuncList; + public final PunctuationSuggestions mSuggestPuncList; private final int mSentenceSeparator; public final String mSentenceSeparatorAndSpace; public final boolean mCurrentLanguageHasSpaces; @@ -56,9 +52,6 @@ public final class SpacingAndPunctuations { res.getString(R.string.symbols_word_connectors)); mSortedWordSeparators = StringUtils.toSortedCodePointArray( res.getString(R.string.symbols_word_separators)); - final String[] suggestPuncsSpec = MoreKeySpec.splitKeySpecs(res.getString( - R.string.suggested_punctuations)); - mSuggestPuncList = createSuggestPuncList(suggestPuncsSpec); mSentenceSeparator = res.getInteger(R.integer.sentence_separator); mSentenceSeparatorAndSpace = new String(new int[] { mSentenceSeparator, Constants.CODE_SPACE }, 0, 2); @@ -68,28 +61,11 @@ public final class SpacingAndPunctuations { // English variants. German rules (not "German typography") also have small gotchas. mUsesAmericanTypography = Locale.ENGLISH.getLanguage().equals(locale.getLanguage()); mUsesGermanRules = Locale.GERMAN.getLanguage().equals(locale.getLanguage()); - } - - // Helper functions to create member values. - private static SuggestedWords createSuggestPuncList(final String[] puncs) { - final ArrayList<SuggestedWordInfo> puncList = CollectionUtils.newArrayList(); - if (puncs != null) { - for (final String puncSpec : puncs) { - // TODO: Stop using KeySpecParser.getLabel(). - // TODO: Punctuation suggestions should honor RTL languages. - puncList.add(new SuggestedWordInfo(KeySpecParser.getLabel(puncSpec), - SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_HARDCODED, - Dictionary.DICTIONARY_HARDCODED, - SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */, - SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */)); - } - } - return new SuggestedWords(puncList, null /* rawSuggestions */, - false /* typedWordValid */, - false /* hasAutoCorrectionCandidate */, - true /* isPunctuationSuggestions */, - false /* isObsoleteSuggestions */, - false /* isPrediction */); + final KeyboardTextsSet textsSet = new KeyboardTextsSet(); + textsSet.setLocale(locale); + final String[] suggestPuncsSpec = MoreKeySpec.splitKeySpecs( + textsSet.resolveTextReference(res.getString(R.string.suggested_punctuations))); + mSuggestPuncList = PunctuationSuggestions.newPunctuationSuggestions(suggestPuncsSpec); } public boolean isWordSeparator(final int code) { @@ -115,4 +91,29 @@ public final class SpacingAndPunctuations { public boolean isSentenceSeparator(final int code) { return code == mSentenceSeparator; } + + public String dump() { + final StringBuilder sb = new StringBuilder(); + sb.append("mSortedSymbolsPrecededBySpace = "); + sb.append("" + Arrays.toString(mSortedSymbolsPrecededBySpace)); + sb.append("\n mSortedSymbolsFollowedBySpace = "); + sb.append("" + Arrays.toString(mSortedSymbolsFollowedBySpace)); + sb.append("\n mSortedWordConnectors = "); + sb.append("" + Arrays.toString(mSortedWordConnectors)); + sb.append("\n mSortedWordSeparators = "); + sb.append("" + Arrays.toString(mSortedWordSeparators)); + sb.append("\n mSuggestPuncList = "); + sb.append("" + mSuggestPuncList); + sb.append("\n mSentenceSeparator = "); + sb.append("" + mSentenceSeparator); + sb.append("\n mSentenceSeparatorAndSpace = "); + sb.append("" + mSentenceSeparatorAndSpace); + sb.append("\n mCurrentLanguageHasSpaces = "); + sb.append("" + mCurrentLanguageHasSpaces); + sb.append("\n mUsesAmericanTypography = "); + sb.append("" + mUsesAmericanTypography); + sb.append("\n mUsesGermanRules = "); + sb.append("" + mUsesGermanRules); + return sb.toString(); + } } diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java index 2f4c1839b..a104baa08 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java +++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java @@ -74,7 +74,7 @@ public final class MoreSuggestions extends Keyboard { int rowStartIndex = fromIndex; final int size = Math.min(suggestedWords.size(), SuggestedWords.MAX_SUGGESTIONS); while (index < size) { - final String word = suggestedWords.getWord(index); + final String word = suggestedWords.getLabel(index); // TODO: Should take care of text x-scaling. mWidths[index] = (int)(TypefaceUtils.getStringWidth(word, paint) + padding); final int numColumn = index - rowStartIndex + 1; @@ -206,7 +206,7 @@ public final class MoreSuggestions extends Keyboard { final int x = params.getX(index); final int y = params.getY(index); final int width = params.getWidth(index); - final String word = mSuggestedWords.getWord(index); + final String word = mSuggestedWords.getLabel(index); final String info = mSuggestedWords.getDebugString(index); final int indexInMoreSuggestions = index + SUGGESTION_CODE_BASE; final Key key = new Key(word, KeyboardIconsSet.ICON_UNDEFINED, diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java index 4063edccc..e77c55069 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java @@ -44,8 +44,8 @@ import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; -import com.android.inputmethod.compat.TextViewCompatUtils; import com.android.inputmethod.latin.LatinImeLogger; +import com.android.inputmethod.latin.PunctuationSuggestions; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.utils.AutoCorrectionUtils; @@ -65,7 +65,7 @@ final class SuggestionStripLayoutHelper { public final int mPadding; public final int mDividerWidth; public final int mSuggestionsStripHeight; - public final int mSuggestionsCountInStrip; + private final int mSuggestionsCountInStrip; public final int mMoreSuggestionsRowHeight; private int mMaxMoreSuggestionsRow; public final float mMinMoreSuggestionsWidth; @@ -199,7 +199,7 @@ final class SuggestionStripLayoutHelper { if (indexInSuggestedWords >= suggestedWords.size()) { return null; } - final String word = suggestedWords.getWord(indexInSuggestedWords); + final String word = suggestedWords.getLabel(indexInSuggestedWords); final boolean isAutoCorrect = indexInSuggestedWords == 1 && suggestedWords.mWillAutoCorrect; final boolean isTypedWordValid = indexInSuggestedWords == 0 @@ -264,8 +264,8 @@ final class SuggestionStripLayoutHelper { // is in slot 1. if (positionInStrip == mCenterPositionInStrip && AutoCorrectionUtils.shouldBlockAutoCorrectionBySafetyNet( - suggestedWords.getWord(SuggestedWords.INDEX_OF_AUTO_CORRECTION), - suggestedWords.getWord(SuggestedWords.INDEX_OF_TYPED_WORD))) { + suggestedWords.getLabel(SuggestedWords.INDEX_OF_AUTO_CORRECTION), + suggestedWords.getLabel(SuggestedWords.INDEX_OF_TYPED_WORD))) { return 0xFFFF0000; } } @@ -288,54 +288,65 @@ final class SuggestionStripLayoutHelper { params.gravity = Gravity.CENTER; } - public void layout(final SuggestedWords suggestedWords, final ViewGroup stripView, - final ViewGroup placerView) { - if (suggestedWords.mIsPunctuationSuggestions) { - layoutPunctuationSuggestions(suggestedWords, stripView); - return; + /** + * Layout suggestions to the suggestions strip. And returns the number of suggestions displayed + * in the suggestions strip. + * + * @param suggestedWords suggestions to be shown in the suggestions strip. + * @param stripView the suggestions strip view. + * @param placerView the view where the debug info will be placed. + * @return the number of suggestions displayed in the suggestions strip + */ + public int layoutAndReturnSuggestionCountInStrip(final SuggestedWords suggestedWords, + final ViewGroup stripView, final ViewGroup placerView) { + if (suggestedWords.isPunctuationSuggestions()) { + return layoutPunctuationSuggestionsAndReturnSuggestionCountInStrip( + (PunctuationSuggestions)suggestedWords, stripView); } - final int countInStrip = mSuggestionsCountInStrip; - setupWordViewsTextAndColor(suggestedWords, countInStrip); + setupWordViewsTextAndColor(suggestedWords, mSuggestionsCountInStrip); final TextView centerWordView = mWordViews.get(mCenterPositionInStrip); final int availableStripWidth = placerView.getWidth() - placerView.getPaddingRight() - placerView.getPaddingLeft(); final int centerWidth = getSuggestionWidth(mCenterPositionInStrip, availableStripWidth); - if (getTextScaleX(centerWordView.getText(), centerWidth, centerWordView.getPaint()) - < MIN_TEXT_XSCALE) { + final int countInStrip; + if (suggestedWords.size() == 1 || getTextScaleX(centerWordView.getText(), centerWidth, + centerWordView.getPaint()) < MIN_TEXT_XSCALE) { // Layout only the most relevant suggested word at the center of the suggestion strip // by consolidating all slots in the strip. - mMoreSuggestionsAvailable = (suggestedWords.size() > 1); + countInStrip = 1; + mMoreSuggestionsAvailable = (suggestedWords.size() > countInStrip); layoutWord(mCenterPositionInStrip, availableStripWidth - mPadding); stripView.addView(centerWordView); setLayoutWeight(centerWordView, 1.0f, ViewGroup.LayoutParams.MATCH_PARENT); if (SuggestionStripView.DBG) { layoutDebugInfo(mCenterPositionInStrip, placerView, availableStripWidth); } - return; - } - - mMoreSuggestionsAvailable = (suggestedWords.size() > countInStrip); - int x = 0; - for (int positionInStrip = 0; positionInStrip < countInStrip; positionInStrip++) { - if (positionInStrip != 0) { - final View divider = mDividerViews.get(positionInStrip); - // Add divider if this isn't the left most suggestion in suggestions strip. - addDivider(stripView, divider); - x += divider.getMeasuredWidth(); - } - - final int width = getSuggestionWidth(positionInStrip, availableStripWidth); - final TextView wordView = layoutWord(positionInStrip, width); - stripView.addView(wordView); - setLayoutWeight(wordView, getSuggestionWeight(positionInStrip), - ViewGroup.LayoutParams.MATCH_PARENT); - x += wordView.getMeasuredWidth(); - - if (SuggestionStripView.DBG) { - layoutDebugInfo(positionInStrip, placerView, x); + } else { + countInStrip = mSuggestionsCountInStrip; + mMoreSuggestionsAvailable = (suggestedWords.size() > countInStrip); + int x = 0; + for (int positionInStrip = 0; positionInStrip < countInStrip; positionInStrip++) { + if (positionInStrip != 0) { + final View divider = mDividerViews.get(positionInStrip); + // Add divider if this isn't the left most suggestion in suggestions strip. + addDivider(stripView, divider); + x += divider.getMeasuredWidth(); + } + + final int width = getSuggestionWidth(positionInStrip, availableStripWidth); + final TextView wordView = layoutWord(positionInStrip, width); + stripView.addView(wordView); + setLayoutWeight(wordView, getSuggestionWeight(positionInStrip), + ViewGroup.LayoutParams.MATCH_PARENT); + x += wordView.getMeasuredWidth(); + + if (SuggestionStripView.DBG) { + layoutDebugInfo(positionInStrip, placerView, x); + } } } + return countInStrip; } /** @@ -435,9 +446,9 @@ final class SuggestionStripLayoutHelper { } } - private void layoutPunctuationSuggestions(final SuggestedWords suggestedWords, - final ViewGroup stripView) { - final int countInStrip = Math.min(suggestedWords.size(), PUNCTUATIONS_IN_STRIP); + private int layoutPunctuationSuggestionsAndReturnSuggestionCountInStrip( + final PunctuationSuggestions punctuationSuggestions, final ViewGroup stripView) { + final int countInStrip = Math.min(punctuationSuggestions.size(), PUNCTUATIONS_IN_STRIP); for (int positionInStrip = 0; positionInStrip < countInStrip; positionInStrip++) { if (positionInStrip != 0) { // Add divider if this isn't the left most suggestion in suggestions strip. @@ -450,13 +461,14 @@ final class SuggestionStripLayoutHelper { // {@link TextView#getTag()} is used to get the index in suggestedWords at // {@link SuggestionStripView#onClick(View)}. wordView.setTag(positionInStrip); - wordView.setText(suggestedWords.getWord(positionInStrip)); + wordView.setText(punctuationSuggestions.getLabel(positionInStrip)); wordView.setTextScaleX(1.0f); wordView.setCompoundDrawables(null, null, null, null); stripView.addView(wordView); setLayoutWeight(wordView, 1.0f, mSuggestionsStripHeight); } - mMoreSuggestionsAvailable = (suggestedWords.size() > countInStrip); + mMoreSuggestionsAvailable = (punctuationSuggestions.size() > countInStrip); + return countInStrip; } public void layoutAddToDictionaryHint(final String word, final ViewGroup addToDictionaryStrip, @@ -493,15 +505,10 @@ final class SuggestionStripLayoutHelper { } public void layoutImportantNotice(final View importantNoticeStrip, final int stripWidth) { - final Resources res = importantNoticeStrip.getResources(); - final Drawable infoIcon = res.getDrawable(R.drawable.sym_keyboard_info_holo_dark); - final Drawable moreIcon = res.getDrawable(R.drawable.sym_keyboard_more_holo_dark); - final int width = stripWidth - infoIcon.getIntrinsicWidth() - moreIcon.getIntrinsicWidth(); final TextView titleView = (TextView)importantNoticeStrip.findViewById( R.id.important_notice_title); + final int width = stripWidth - titleView.getPaddingLeft() - titleView.getPaddingRight(); titleView.setTextColor(mColorAutoCorrect); - TextViewCompatUtils.setCompoundDrawablesRelativeWithIntrinsicBounds( - titleView, infoIcon, null, moreIcon, null); final CharSequence importantNoticeTitle = titleView.getText(); titleView.setTextScaleX(1.0f); // Reset textScaleX. final float titleScaleX = getTextScaleX( diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index 68c891bf3..90b9692c3 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -39,11 +39,13 @@ import com.android.inputmethod.keyboard.MainKeyboardView; import com.android.inputmethod.keyboard.MoreKeysPanel; import com.android.inputmethod.latin.AudioAndHapticFeedbackManager; import com.android.inputmethod.latin.Constants; +import com.android.inputmethod.latin.InputAttributes; import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.define.ProductionFlag; +import com.android.inputmethod.latin.settings.Settings; import com.android.inputmethod.latin.suggestions.MoreSuggestions.MoreSuggestionsListener; import com.android.inputmethod.latin.utils.CollectionUtils; import com.android.inputmethod.latin.utils.ImportantNoticeUtils; @@ -77,6 +79,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick Listener mListener; private SuggestedWords mSuggestedWords = SuggestedWords.EMPTY; + private int mSuggestionsCountInStrip; private final SuggestionStripLayoutHelper mLayoutHelper; private final StripVisibilityGroup mStripVisibilityGroup; @@ -189,7 +192,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick clear(); mStripVisibilityGroup.setLayoutDirection(isRtlLanguage); mSuggestedWords = suggestedWords; - mLayoutHelper.layout(mSuggestedWords, mSuggestionsStrip, this); + mSuggestionsCountInStrip = mLayoutHelper.layoutAndReturnSuggestionCountInStrip( + mSuggestedWords, mSuggestionsStrip, this); if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.suggestionStripView_setSuggestions(mSuggestedWords); } @@ -224,9 +228,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick // This method checks if we should show the important notice (checks on permanent storage if // it has been shown once already or not, and if in the setup wizard). If applicable, it shows // the notice. In all cases, it returns true if it was shown, false otherwise. - public boolean maybeShowImportantNoticeTitle() { - if (!ImportantNoticeUtils.hasNewImportantNotice(getContext()) - || ImportantNoticeUtils.isInSystemSetupWizard(getContext())) { + public boolean maybeShowImportantNoticeTitle(final InputAttributes inputAttributes) { + if (!ImportantNoticeUtils.shouldShowImportantNotice(getContext(), inputAttributes)) { return false; } final int width = getWidth(); @@ -313,7 +316,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick final View container = mMoreSuggestionsContainer; final int maxWidth = stripWidth - container.getPaddingLeft() - container.getPaddingRight(); final MoreSuggestions.Builder builder = mMoreSuggestionsBuilder; - builder.layout(mSuggestedWords, layoutHelper.mSuggestionsCountInStrip, maxWidth, + builder.layout(mSuggestedWords, mSuggestionsCountInStrip, maxWidth, (int)(maxWidth * layoutHelper.mMinMoreSuggestionsWidth), layoutHelper.getMaxMoreSuggestionsRow(), parentKeyboard); mMoreSuggestionsView.setKeyboard(builder.build()); @@ -324,20 +327,16 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick final int pointY = -layoutHelper.mMoreSuggestionsBottomGap; moreKeysPanel.showMoreKeysPanel(this, mMoreSuggestionsController, pointX, pointY, mMoreSuggestionsListener); - mMoreSuggestionsMode = MORE_SUGGESTIONS_CHECKING_MODAL_OR_SLIDING; mOriginX = mLastX; mOriginY = mLastY; - for (int i = 0; i < layoutHelper.mSuggestionsCountInStrip; i++) { + for (int i = 0; i < mSuggestionsCountInStrip; i++) { mWordViews.get(i).setPressed(false); } return true; } - // Working variables for onLongClick and dispatchTouchEvent. - private int mMoreSuggestionsMode = MORE_SUGGESTIONS_IN_MODAL_MODE; - private static final int MORE_SUGGESTIONS_IN_MODAL_MODE = 0; - private static final int MORE_SUGGESTIONS_CHECKING_MODAL_OR_SLIDING = 1; - private static final int MORE_SUGGESTIONS_IN_SLIDING_MODE = 2; + // Working variables for {@link #onLongClick(View)} and + // {@link onInterceptTouchEvent(MotionEvent)}. private int mLastX; private int mLastY; private int mOriginX; @@ -357,36 +356,39 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick }; @Override - public boolean dispatchTouchEvent(final MotionEvent me) { + public boolean onInterceptTouchEvent(final MotionEvent me) { if (!mMoreSuggestionsView.isShowingInParent()) { mLastX = (int)me.getX(); mLastY = (int)me.getY(); - if (mMoreSuggestionsSlidingDetector.onTouchEvent(me)) { - return true; - } - return super.dispatchTouchEvent(me); + return mMoreSuggestionsSlidingDetector.onTouchEvent(me); } final int action = me.getAction(); final int index = me.getActionIndex(); final int x = (int)me.getX(index); final int y = (int)me.getY(index); - - if (mMoreSuggestionsMode == MORE_SUGGESTIONS_CHECKING_MODAL_OR_SLIDING) { - if (Math.abs(x - mOriginX) >= mMoreSuggestionsModalTolerance - || mOriginY - y >= mMoreSuggestionsModalTolerance) { - // Decided to be in the sliding input mode only when the touch point has been moved - // upward. - mMoreSuggestionsMode = MORE_SUGGESTIONS_IN_SLIDING_MODE; - } else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_POINTER_UP) { - // Decided to be in the modal input mode - mMoreSuggestionsMode = MORE_SUGGESTIONS_IN_MODAL_MODE; - mMoreSuggestionsView.adjustVerticalCorrectionForModalMode(); - } + if (Math.abs(x - mOriginX) >= mMoreSuggestionsModalTolerance + || mOriginY - y >= mMoreSuggestionsModalTolerance) { + // Decided to be in the sliding input mode only when the touch point has been moved + // upward. Further {@link MotionEvent}s will be delivered to + // {@link #onTouchEvent(MotionEvent)}. return true; } - // MORE_SUGGESTIONS_IN_SLIDING_MODE + if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_POINTER_UP) { + // Decided to be in the modal input mode. + mMoreSuggestionsView.adjustVerticalCorrectionForModalMode(); + } + return false; + } + + @Override + public boolean onTouchEvent(final MotionEvent me) { + // In the sliding input mode. {@link MotionEvent} should be forwarded to + // {@link MoreSuggestionsView}. + final int index = me.getActionIndex(); + final int x = (int)me.getX(index); + final int y = (int)me.getY(index); me.setLocation(mMoreSuggestionsView.translateX(x), mMoreSuggestionsView.translateY(y)); mMoreSuggestionsView.onTouchEvent(me); return true; @@ -430,6 +432,6 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick protected void onSizeChanged(int w, int h, int oldw, int oldh) { // Called by the framework when the size is known. Show the important notice if applicable. // This may be overriden by showing suggestions later, if applicable. - maybeShowImportantNoticeTitle(); + maybeShowImportantNoticeTitle(Settings.getInstance().getCurrent().mInputAttributes); } } diff --git a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java index 4a0823155..50a942382 100644 --- a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java @@ -22,6 +22,7 @@ import android.provider.Settings; import android.provider.Settings.SettingNotFoundException; import android.util.Log; +import com.android.inputmethod.latin.InputAttributes; import com.android.inputmethod.latin.R; public final class ImportantNoticeUtils { @@ -42,7 +43,7 @@ public final class ImportantNoticeUtils { // This utility class is not publicly instantiable. } - public static boolean isInSystemSetupWizard(final Context context) { + private static boolean isInSystemSetupWizard(final Context context) { try { final int userSetupComplete = Settings.Secure.getInt( context.getContentResolver(), Settings_Secure_USER_SETUP_COMPLETE); @@ -62,12 +63,20 @@ public final class ImportantNoticeUtils { return context.getResources().getInteger(R.integer.config_important_notice_version); } - public static boolean hasNewImportantNotice(final Context context) { + private static boolean hasNewImportantNotice(final Context context) { final SharedPreferences prefs = getImportantNoticePreferences(context); final int lastVersion = prefs.getInt(KEY_IMPORTANT_NOTICE_VERSION, 0); return getCurrentImportantNoticeVersion(context) > lastVersion; } + public static boolean shouldShowImportantNotice(final Context context, + final InputAttributes inputAttributes) { + if (inputAttributes == null || inputAttributes.mIsPasswordField) { + return false; + } + return hasNewImportantNotice(context) && !isInSystemSetupWizard(context); + } + public static void updateLastImportantNoticeVersion(final Context context) { final SharedPreferences prefs = getImportantNoticePreferences(context); prefs.edit() diff --git a/java/src/com/android/inputmethod/latin/utils/SpannableStringUtils.java b/java/src/com/android/inputmethod/latin/utils/SpannableStringUtils.java index be0955456..38164cb36 100644 --- a/java/src/com/android/inputmethod/latin/utils/SpannableStringUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/SpannableStringUtils.java @@ -22,6 +22,7 @@ import android.text.Spanned; import android.text.SpannedString; import android.text.TextUtils; import android.text.style.SuggestionSpan; +import android.text.style.URLSpan; public final class SpannableStringUtils { /** @@ -112,4 +113,16 @@ public final class SpannableStringUtils { return new SpannedString(ss); } + + public static boolean hasUrlSpans(final CharSequence text, + final int startIndex, final int endIndex) { + if (!(text instanceof Spanned)) { + return false; // Not spanned, so no link + } + final Spanned spanned = (Spanned)text; + // getSpans(x, y) does not return spans that start on x or end on y. x-1, y+1 does the + // trick, and works in all cases even if startIndex <= 0 or endIndex >= text.length(). + final URLSpan[] spans = spanned.getSpans(startIndex - 1, endIndex + 1, URLSpan.class); + return null != spans && spans.length > 0; + } } diff --git a/java/src/com/android/inputmethod/latin/utils/TextRange.java b/java/src/com/android/inputmethod/latin/utils/TextRange.java index 48b443ddd..dbf3b5060 100644 --- a/java/src/com/android/inputmethod/latin/utils/TextRange.java +++ b/java/src/com/android/inputmethod/latin/utils/TextRange.java @@ -31,6 +31,7 @@ public final class TextRange { private final int mCursorIndex; public final CharSequence mWord; + public final boolean mHasUrlSpans; public int getNumberOfCharsInWordBeforeCursor() { return mCursorIndex - mWordAtCursorStartIndex; @@ -95,7 +96,7 @@ public final class TextRange { } } if (spanStart == mWordAtCursorStartIndex && spanEnd == mWordAtCursorEndIndex) { - // If the span does not start and stop here, we ignore it. It probably extends + // If the span does not start and stop here, ignore it. It probably extends // past the start or end of the word, as happens in missing space correction // or EasyEditSpans put by voice input. spans[writeIndex++] = spans[readIndex]; @@ -105,7 +106,7 @@ public final class TextRange { } public TextRange(final CharSequence textAtCursor, final int wordAtCursorStartIndex, - final int wordAtCursorEndIndex, final int cursorIndex) { + final int wordAtCursorEndIndex, final int cursorIndex, final boolean hasUrlSpans) { if (wordAtCursorStartIndex < 0 || cursorIndex < wordAtCursorStartIndex || cursorIndex > wordAtCursorEndIndex || wordAtCursorEndIndex > textAtCursor.length()) { @@ -115,6 +116,7 @@ public final class TextRange { mWordAtCursorStartIndex = wordAtCursorStartIndex; mWordAtCursorEndIndex = wordAtCursorEndIndex; mCursorIndex = cursorIndex; + mHasUrlSpans = hasUrlSpans; mWord = mTextAtCursor.subSequence(mWordAtCursorStartIndex, mWordAtCursorEndIndex); } }
\ No newline at end of file diff --git a/java/src/com/android/inputmethod/research/JsonUtils.java b/java/src/com/android/inputmethod/research/JsonUtils.java index 2beebdfae..6170b4339 100644 --- a/java/src/com/android/inputmethod/research/JsonUtils.java +++ b/java/src/com/android/inputmethod/research/JsonUtils.java @@ -91,7 +91,7 @@ import java.util.Map; jsonWriter.name("willAutoCorrect") .value(words.mWillAutoCorrect); jsonWriter.name("isPunctuationSuggestions") - .value(words.mIsPunctuationSuggestions); + .value(words.isPunctuationSuggestions()); jsonWriter.name("isObsoleteSuggestions").value(words.mIsObsoleteSuggestions); jsonWriter.name("isPrediction").value(words.mIsPrediction); jsonWriter.name("suggestedWords"); |