Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Sources/OpenKey/engine/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1102,8 +1102,8 @@ void handleMainKey(const Uint16& data, const bool& isCaps) {

//if is mark key
if (IS_MARK_KEY(data)) {
for (i = 0; i < _vowelForMark.size(); i++) {
vector<vector<Uint16>>& charset = _vowelForMark[i];
for (auto& vowelEntry : _vowelForMark) {
vector<vector<Uint16>>& charset = vowelEntry.second;
isCorect = false;
isChanged = false;
k = _index;
Expand All @@ -1112,7 +1112,7 @@ void handleMainKey(const Uint16& data, const bool& isCaps) {
continue;
isCorect = true;
checkCorrectVowel(charset, l, k, data);

if (isCorect) {
isChanged = true;
if (IS_KEY_S(data))
Expand All @@ -1133,11 +1133,11 @@ void handleMainKey(const Uint16& data, const bool& isCaps) {
break;
}
}

if (!isChanged) {
insertKey(data, isCaps);
}

return;
}

Expand Down
1 change: 1 addition & 0 deletions Sources/OpenKey/engine/Vietnamese.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ map<Uint16, vector<vector<Uint16>>> _vowelForMark = {
{ KEY_U, KEY_Y, KEY_N},
{ KEY_U, KEY_Y, KEY_T},
{ KEY_U, KEY_Y, KEY_P},
{ KEY_U, KEY_Y, KEY_C, KEY_H}, {KEY_U, KEY_Y, KEY_K | END_CONSONANT_MASK},
{ KEY_U, KEY_Y, KEY_N, KEY_H}, {KEY_U, KEY_Y, KEY_H | END_CONSONANT_MASK},
{ KEY_U, KEY_T},
{ KEY_U, KEY_U},
Expand Down