Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f34ec5aa authored by Tom Ouyang's avatar Tom Ouyang
Browse files

Make gestures work correctly on keyboards with accented keys

Examples: Spanish, Russian

Bug: 7225962

Change-Id: I6887bc6d81b84e4a73a74de679b955f7abf0ba4f
parent a161bdac
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -239,8 +239,8 @@ int ProximityInfo::getKeyIndexOf(const int c) const {
        // We do not have the coordinate data
        return NOT_AN_INDEX;
    }
    const int baseLowerC = static_cast<int>(toBaseLowerCase(c));
    hash_map_compat<int, int>::const_iterator mapPos = mCodeToKeyMap.find(baseLowerC);
    const int lowerCode = static_cast<int>(toLowerCase(c));
    hash_map_compat<int, int>::const_iterator mapPos = mCodeToKeyMap.find(lowerCode);
    if (mapPos != mCodeToKeyMap.end()) {
        return mapPos->second;
    }
@@ -258,7 +258,7 @@ void ProximityInfo::initializeG() {
    // TODO: Optimize
    for (int i = 0; i < KEY_COUNT; ++i) {
        const int code = mKeyCodePoints[i];
        const int lowerCode = toBaseLowerCase(code);
        const int lowerCode = static_cast<int>(toLowerCase(code));
        mCenterXsG[i] = mKeyXCoordinates[i] + mKeyWidths[i] / 2;
        mCenterYsG[i] = mKeyYCoordinates[i] + mKeyHeights[i] / 2;
        mCodeToKeyMap[lowerCode] = i;