diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java
index 7ba3b3bd5dde5e5dbc90a3038a786e5b3b9e85f7..d01c4cc8f55a54e5bdec96828b1f63f764781889 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java
@@ -211,6 +211,10 @@ public final class KeyboardLayoutSet {
         return keyboard;
     }
 
+    public int getScriptId() {
+        return mParams.mScriptId;
+    }
+
     public static final class Builder {
         private final Context mContext;
         private final String mPackageName;
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 6aeff189f4c6dad87500681b9c727f13cf2d2c4a..dd71e9d4ff34a83c9ea0475ef32bc49553e68019 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -370,4 +370,8 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
             return WordComposer.CAPS_MODE_OFF;
         }
     }
+
+    public int getCurrentKeyboardScriptId() {
+        return mKeyboardLayoutSet.getScriptId();
+    }
 }
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 6e5e0deaae1684678a4043936de61604b2a024d7..c9a4bf5a1494c4b543d70739084beabb213bed40 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -227,7 +227,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
             case MSG_RESUME_SUGGESTIONS:
                 latinIme.mInputLogic.restartSuggestionsOnWordTouchedByCursor(
                         latinIme.mSettings.getCurrent(),
-                        msg.arg1 == ARG1_TRUE /* shouldIncludeResumedWordInSuggestions */);
+                        msg.arg1 == ARG1_TRUE /* shouldIncludeResumedWordInSuggestions */,
+                        latinIme.mKeyboardSwitcher.getCurrentKeyboardScriptId());
                 break;
             case MSG_REOPEN_DICTIONARIES:
                 latinIme.resetSuggest();
@@ -1239,7 +1240,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
         final Event event = createSoftwareKeypressEvent(codeToSend, keyX, keyY, isKeyRepeat);
         final InputTransaction completeInputTransaction =
                 mInputLogic.onCodeInput(mSettings.getCurrent(), event,
-                        mKeyboardSwitcher.getKeyboardShiftMode(), mHandler);
+                        mKeyboardSwitcher.getKeyboardShiftMode(),
+                        mKeyboardSwitcher.getCurrentKeyboardScriptId(), mHandler);
         updateStateAfterInputTransaction(completeInputTransaction);
         mKeyboardSwitcher.onCodeInput(codePoint, getCurrentAutoCapsState(),
                 getCurrentRecapitalizeState());
@@ -1423,10 +1425,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
     // Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener}
     // interface
     @Override
-    public void pickSuggestionManually(final int index, final SuggestedWordInfo suggestionInfo) {
+    public void pickSuggestionManually(final SuggestedWordInfo suggestionInfo) {
         final InputTransaction completeInputTransaction = mInputLogic.onPickSuggestionManually(
-                mSettings.getCurrent(), index, suggestionInfo,
-                mKeyboardSwitcher.getKeyboardShiftMode(), mHandler);
+                mSettings.getCurrent(), suggestionInfo,
+                mKeyboardSwitcher.getKeyboardShiftMode(),
+                mKeyboardSwitcher.getCurrentKeyboardScriptId(),
+                mHandler);
         updateStateAfterInputTransaction(completeInputTransaction);
     }
 
@@ -1553,7 +1557,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
         // If it's handled, we return true because we did handle it.
         if (event.isHandled()) {
             mInputLogic.onCodeInput(mSettings.getCurrent(), event,
-                    mKeyboardSwitcher.getKeyboardShiftMode(), mHandler);
+                    mKeyboardSwitcher.getKeyboardShiftMode(),
+                    // TODO: this is not necessarily correct for a hardware keyboard right now
+                    mKeyboardSwitcher.getCurrentKeyboardScriptId(),
+                    mHandler);
             return true;
         }
         return super.onKeyDown(keyCode, keyEvent);
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 15ddcf9aed2b3e3c5888c855b79f910cb5fbb082..158663d9606f1d1b4f2399b75f5f74ec1fd88106 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -213,7 +213,6 @@ public final class InputLogic {
     /**
      * A suggestion was picked from the suggestion strip.
      * @param settingsValues the current values of the settings.
-     * @param index the index of the suggestion.
      * @param suggestionInfo the suggestion info.
      * @param keyboardShiftState the shift state of the keyboard, as returned by
      *     {@link com.android.inputmethod.keyboard.KeyboardSwitcher#getKeyboardShiftMode()}
@@ -222,9 +221,9 @@ public final class InputLogic {
     // Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener}
     // interface
     public InputTransaction onPickSuggestionManually(final SettingsValues settingsValues,
-            final int index, final SuggestedWordInfo suggestionInfo, final int keyboardShiftState,
-            // TODO: remove this argument
-            final LatinIME.UIHandler handler) {
+            final SuggestedWordInfo suggestionInfo, final int keyboardShiftState,
+            // TODO: remove these arguments
+            final int currentKeyboardScriptId, final LatinIME.UIHandler handler) {
         final SuggestedWords suggestedWords = mSuggestedWords;
         final String suggestion = suggestionInfo.mWord;
         // If this is a punctuation picked from the suggestion strip, pass it to onCodeInput
@@ -232,7 +231,8 @@ public final class InputLogic {
             // Word separators are suggested before the user inputs something.
             // Rely on onCodeInput to do the complicated swapping/stripping logic consistently.
             final Event event = Event.createPunctuationSuggestionPickedEvent(suggestionInfo);
-            return onCodeInput(settingsValues, event, keyboardShiftState, handler);
+            return onCodeInput(settingsValues, event, keyboardShiftState,
+                    currentKeyboardScriptId, handler);
         }
 
         final Event event = Event.createSuggestionPickedEvent(suggestionInfo);
@@ -378,8 +378,8 @@ public final class InputLogic {
      */
     public InputTransaction onCodeInput(final SettingsValues settingsValues, final Event event,
             final int keyboardShiftMode,
-            // TODO: remove this argument
-            final LatinIME.UIHandler handler) {
+            // TODO: remove these arguments
+            final int currentKeyboardScriptId, final LatinIME.UIHandler handler) {
         final InputTransaction inputTransaction = new InputTransaction(settingsValues, event,
                 SystemClock.uptimeMillis(), mSpaceState,
                 getActualCapsMode(settingsValues, keyboardShiftMode));
@@ -403,7 +403,7 @@ public final class InputLogic {
             // A special key, like delete, shift, emoji, or the settings key.
             switch (event.mKeyCode) {
             case Constants.CODE_DELETE:
-                handleBackspace(inputTransaction);
+                handleBackspace(inputTransaction, currentKeyboardScriptId);
                 break;
             case Constants.CODE_SHIFT:
                 performRecapitalization(inputTransaction.mSettingsValues);
@@ -857,7 +857,9 @@ public final class InputLogic {
      * Handle a press on the backspace key.
      * @param inputTransaction The transaction in progress.
      */
-    private void handleBackspace(final InputTransaction inputTransaction) {
+    private void handleBackspace(final InputTransaction inputTransaction,
+            // TODO: remove this argument, put it into settingsValues
+            final int currentKeyboardScriptId) {
         mSpaceState = SpaceState.NONE;
         mDeleteCount++;
 
@@ -991,7 +993,7 @@ public final class InputLogic {
                     && !mConnection.isCursorFollowedByWordCharacter(
                             inputTransaction.mSettingsValues.mSpacingAndPunctuations)) {
                 restartSuggestionsOnWordTouchedByCursor(inputTransaction.mSettingsValues,
-                        true /* shouldIncludeResumedWordInSuggestions */);
+                        true /* shouldIncludeResumedWordInSuggestions */, currentKeyboardScriptId);
             }
         }
     }
@@ -1244,7 +1246,9 @@ public final class InputLogic {
      */
     // TODO: make this private.
     public void restartSuggestionsOnWordTouchedByCursor(final SettingsValues settingsValues,
-            final boolean shouldIncludeResumedWordInSuggestions) {
+            final boolean shouldIncludeResumedWordInSuggestions,
+            // TODO: remove this argument, put it into settingsValues
+            final int currentKeyboardScriptId) {
         // HACK: We may want to special-case some apps that exhibit bad behavior in case of
         // recorrection. This is a temporary, stopgap measure that will be removed later.
         // TODO: remove this.
diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java
index 47921ca0a62c67e93379a18d5249f882a4ace965..f7b6f919ddb620cfbf25c4df35abe0cfbd3668ac 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java
@@ -37,7 +37,7 @@ public final class MoreSuggestionsView extends MoreKeysKeyboardView {
     private static final String TAG = MoreSuggestionsView.class.getSimpleName();
 
     public static abstract class MoreSuggestionsListener extends KeyboardActionListener.Adapter {
-        public abstract void onSuggestionSelected(final int index, final SuggestedWordInfo info);
+        public abstract void onSuggestionSelected(final SuggestedWordInfo info);
     }
 
     public MoreSuggestionsView(final Context context, final AttributeSet attrs) {
@@ -104,7 +104,6 @@ public final class MoreSuggestionsView extends MoreKeysKeyboardView {
                     + mListener.getClass().getName());
             return;
         }
-        ((MoreSuggestionsListener)mListener).onSuggestionSelected(
-                index, suggestedWords.getInfo(index));
+        ((MoreSuggestionsListener)mListener).onSuggestionSelected(suggestedWords.getInfo(index));
     }
 }
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
index aebfb7d4c6b5f0b49613ed1308726b2d9776fa7b..8654e12a99c72b6c5174660829b79844164ea488 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
@@ -59,7 +59,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
     public interface Listener {
         public void addWordToUserDictionary(String word);
         public void showImportantNoticeContents();
-        public void pickSuggestionManually(int index, SuggestedWordInfo word);
+        public void pickSuggestionManually(SuggestedWordInfo word);
         public void onCodeInput(int primaryCode, int x, int y, boolean isKeyRepeat);
     }
 
@@ -286,8 +286,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
 
     private final MoreSuggestionsListener mMoreSuggestionsListener = new MoreSuggestionsListener() {
         @Override
-        public void onSuggestionSelected(final int index, final SuggestedWordInfo wordInfo) {
-            mListener.pickSuggestionManually(index, wordInfo);
+        public void onSuggestionSelected(final SuggestedWordInfo wordInfo) {
+            mListener.pickSuggestionManually(wordInfo);
             dismissMoreSuggestionsPanel();
         }
 
@@ -465,7 +465,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
                 return;
             }
             final SuggestedWordInfo wordInfo = mSuggestedWords.getInfo(index);
-            mListener.pickSuggestionManually(index, wordInfo);
+            mListener.pickSuggestionManually(wordInfo);
         }
     }