diff --git a/native/jni/src/proximity_info_state.cpp b/native/jni/src/proximity_info_state.cpp index 4c67ea81c865212a0bc2649333458261e59ba637..b363dcc368f0b6a7cd1032086d3f6f42ebb4ccee 100644 --- a/native/jni/src/proximity_info_state.cpp +++ b/native/jni/src/proximity_info_state.cpp @@ -395,6 +395,11 @@ float ProximityInfoState::getPointToKeyLength(int inputIndex, int codePoint, flo const int index = inputIndex * mProximityInfo->getKeyCount() + keyId; return min(mDistanceCache[index] * scale, mMaxPointToKeyLength); } + // TODO: Do not hardcode here + // No penalty to ' and - + if (codePoint == '\'' || codePoint == '-') { + return 0; + } // If the char is not a key on the keyboard then return the max length. return MAX_POINT_TO_KEY_LENGTH; }