removed the Korean punctuation hack
This commit is contained in:
parent
850e16f101
commit
2cdc1dc04f
3 changed files with 5 additions and 22 deletions
|
|
@ -46,7 +46,7 @@ class ModeCheonjiin extends InputMode {
|
|||
protected ModeCheonjiin(SettingsStore settings, InputType inputType, TextField textField) {
|
||||
super(settings, inputType);
|
||||
|
||||
SPECIAL_CHAR_SEQUENCE_PREFIX = settings.holdForPunctuationInKorean() ? "11" : "1";
|
||||
SPECIAL_CHAR_SEQUENCE_PREFIX = "11";
|
||||
|
||||
digitSequence = "";
|
||||
allowedTextCases.add(CASE_LOWER);
|
||||
|
|
@ -77,9 +77,7 @@ class ModeCheonjiin extends InputMode {
|
|||
protected void setCustomSpecialCharacters() {
|
||||
// special
|
||||
KEY_CHARACTERS.add(TextTools.removeLettersFromList(applyPunctuationOrder(Characters.Special, 0)));
|
||||
if (settings.holdForPunctuationInKorean()) {
|
||||
KEY_CHARACTERS.get(0).add(0, "0");
|
||||
}
|
||||
KEY_CHARACTERS.get(0).add(0, "0");
|
||||
|
||||
// punctuation
|
||||
KEY_CHARACTERS.add(
|
||||
|
|
@ -107,7 +105,7 @@ class ModeCheonjiin extends InputMode {
|
|||
|
||||
@Override
|
||||
public boolean onBackspace() {
|
||||
if (settings.holdForPunctuationInKorean() && digitSequence.equals(PUNCTUATION_SEQUENCE)) {
|
||||
if (digitSequence.equals(PUNCTUATION_SEQUENCE)) {
|
||||
digitSequence = "";
|
||||
} else if (digitSequence.equals(SPECIAL_CHAR_SEQUENCE) || (!digitSequence.startsWith(PUNCTUATION_SEQUENCE) && Cheonjiin.isSingleJamo(digitSequence))) {
|
||||
digitSequence = "";
|
||||
|
|
@ -137,10 +135,10 @@ class ModeCheonjiin extends InputMode {
|
|||
|
||||
|
||||
protected void onNumberHold(int number) {
|
||||
if (settings.holdForPunctuationInKorean() && number == 0) {
|
||||
if (number == 0) {
|
||||
disablePredictions = false;
|
||||
digitSequence = SPECIAL_CHAR_SEQUENCE;
|
||||
} else if (settings.holdForPunctuationInKorean() && number == 1) {
|
||||
} else if (number == 1) {
|
||||
disablePredictions = false;
|
||||
digitSequence = PUNCTUATION_SEQUENCE;
|
||||
} else {
|
||||
|
|
@ -169,10 +167,6 @@ class ModeCheonjiin extends InputMode {
|
|||
final int repeatingDigits = digitSequence.length() > 1 && digitSequence.charAt(digitSequence.length() - 1) == nextChar ? Cheonjiin.getRepeatingEndingDigits(digitSequence) : 0;
|
||||
final int keyCharsCount = nextNumber == 0 ? 2 : language.getKeyCharacters(nextNumber).size();
|
||||
|
||||
if (!settings.holdForPunctuationInKorean() && SPECIAL_CHAR_SEQUENCE.equals(digitSequence + nextNumber)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (SPECIAL_CHAR_SEQUENCE.equals(digitSequence)) {
|
||||
return SPECIAL_CHAR_SEQUENCE.length();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,10 +37,6 @@ class SettingsHacks extends BaseSettings {
|
|||
|
||||
/************* hack settings *************/
|
||||
|
||||
public boolean holdForPunctuationInKorean() {
|
||||
return prefs.getBoolean("pref_hold_for_punctuation_in_korean", true);
|
||||
}
|
||||
|
||||
public int getSuggestionScrollingDelay() {
|
||||
boolean defaultOn = DeviceInfo.noTouchScreen(context) && Build.VERSION.SDK_INT < Build.VERSION_CODES.Q;
|
||||
return prefs.getBoolean("pref_alternative_suggestion_scrolling", defaultOn) ? 200 : 0;
|
||||
|
|
|
|||
|
|
@ -19,13 +19,6 @@
|
|||
<DropDownPreference
|
||||
app:key="pref_input_handling_mode"
|
||||
app:title="Keypad Handling Mode" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:key="pref_hold_for_punctuation_in_korean"
|
||||
app:title="Hold to type special chars in Korean"
|
||||
app:summaryOff="Type special chars by multi-pressing 1-key or 0-key"
|
||||
app:summaryOn="Type special chars by holding 1-key or 0-key" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory app:title="Logging" app:singleLineTitle="true">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue