Remove option "Lockable modifiers"

This commit is contained in:
Jules Aguillon 2022-11-06 19:34:57 +01:00
parent 6a7fbf5e50
commit d2128e777e
9 changed files with 8 additions and 35 deletions

View File

@ -23,8 +23,6 @@
<string name="pref_vibrate_summary">Zapnout/Vypnout vibrace při stisku klávesy</string>
<string name="pref_precise_repeat_title">Precizní posun kurzoru</string>
<string name="pref_precise_repeat_summary">Zda-li posun prstem ovlivňuje rychlost kurzoru</string>
<string name="pref_lockable_keys_title">Zastaralé: Zamykatelné modifikační klávesy</string>
<string name="pref_lockable_keys_summary">Tato možnost bude v budoucnu odebrána</string>
<string name="pref_lock_double_tap_title">Dvojklik pro aktivaci caps lock(u)</string>
<string name="pref_lock_double_tap_summary">Dvojklik namísto držení modifikačních kláves po nějakou dobu</string>
<string name="pref_category_style">Styl</string>

View File

@ -28,8 +28,6 @@
<string name="pref_vibrate_summary">Vibration bei Tastendruck ein-/ausschalten</string>
<string name="pref_precise_repeat_title">Präzise Cursorsteuerung</string>
<string name="pref_precise_repeat_summary">Geschwindigkeit der Tastenwiederholung durch weniger oder mehr Wischen anpassen</string>
<string name="pref_lockable_keys_title">Veraltet: Sperrbare Hilfstasten</string>
<string name="pref_lockable_keys_summary">Wird entfernt. (Hilfstasten, die durch zweimaliges Tippen gesperrt (eingerastet) werden können)</string>
<string name="pref_lock_double_tap_title">Umschalttaste mit Doppeltippen einrasten</string>
<string name="pref_lock_double_tap_summary">Anstatt Taste längere Zeit gedrückt zu halten</string>
<string name="pref_category_style">Design</string>

View File

@ -23,7 +23,6 @@
<string name="pref_vibrate_summary">Abilita/Disabilita Vibrazione alla pressione dei tasti</string>
<string name="pref_precise_repeat_title">Movimento puntatore preciso</string>
<string name="pref_precise_repeat_summary">Modula la veocità della ripetizione con lo swipe</string>
<string name="pref_lockable_keys_title">Deprecato: Modificatori bloccabili</string>
<string name="pref_lock_double_tap_title">Doppio tocco su Shift per attivare CapsLock</string>
<string name="pref_lock_double_tap_summary">Invece di premere i modificatori a lungo</string>
<string name="pref_category_style">Stile</string>

View File

@ -24,8 +24,6 @@
<string name="pref_vibrate_summary">Iespējot/atspējot taustiņa piespiešanas trīcēšanu</string>
<string name="pref_precise_repeat_title">Pielāgojama kursora kustība</string>
<string name="pref_precise_repeat_summary">Mainīt taustiņa atkārtošanās ātrumu ar pavilkšanas attālumu</string>
<string name="pref_lockable_keys_title">Novecojis: Slēdzami pārveidotāji</string>
<string name="pref_lockable_keys_summary">Šī iespēja tiks noņemta</string>
<string name="pref_lock_double_tap_title">Divkāršs piesitiens burtslēgam</string>
<string name="pref_lock_double_tap_summary">Tā vietā, lai ilstoši piespiestu pārveidotāju</string>
<string name="pref_category_style">Izskata pielāgojumi</string>

View File

@ -23,8 +23,6 @@
<string name="pref_vibrate_summary">Ativar/desativar vibração ao digitar</string>
<string name="pref_precise_repeat_title">Precisão nos movimentos do cursor</string>
<string name="pref_precise_repeat_summary">Varia a velocidade de repetição a depender do quanto deslizar</string>
<string name="pref_lockable_keys_title">Descontinuado: Modificadores fixáveis</string>
<string name="pref_lockable_keys_summary">Essa opção será removida</string>
<string name="pref_lock_double_tap_title">Tecle duas vezes no shift para caixa alta</string>
<string name="pref_lock_double_tap_summary">Ao invés de apertar e segurar por um tempo</string>
<string name="pref_category_style">Estilo</string>

View File

@ -20,8 +20,6 @@
<string name="pref_vibrate_summary">Включение/выключение вибрации при нажатии клавиши</string>
<string name="pref_precise_repeat_title">Точные перемещения курсора</string>
<string name="pref_precise_repeat_summary">Модулируйте скорость повторения клавиш, проводя пальцем больше или меньше</string>
<string name="pref_lockable_keys_title">Запираемые модификаторы</string>
<string name="pref_lockable_keys_summary">Модификаторы, которые можно заблокировать, введя их дважды</string>
<string name="pref_category_style">Стиль</string>
<string name="pref_margin_bottom_title">Нижняя граница поля</string>
<string name="pref_keyboard_height_title">Высота клавиатуры</string>

View File

@ -28,8 +28,6 @@
<string name="pref_vibrate_summary">Enable/disable vibration on keypress</string>
<string name="pref_precise_repeat_title">Precise cursor movements</string>
<string name="pref_precise_repeat_summary">Modulate key repeat speed by swiping more or less</string>
<string name="pref_lockable_keys_title">Deprecated: Lockable modifiers</string>
<string name="pref_lockable_keys_summary">Every modifiers can be locked with a long press</string>
<string name="pref_lock_double_tap_title">Double tap on shift for caps lock</string>
<string name="pref_lock_double_tap_summary">You can lock any modifier by holding it</string>
<string name="pref_category_style">Style</string>

View File

@ -37,15 +37,6 @@
<juloo.common.IntSlideBarPreference android:key="longpress_interval" android:title="@string/pref_long_interval_title" android:summary="%sms" android:defaultValue="25" min="5" max="100"/>
<CheckBoxPreference android:key="precise_repeat" android:title="@string/pref_precise_repeat_title" android:summary="@string/pref_precise_repeat_summary" android:defaultValue="true"/>
<CheckBoxPreference android:key="lock_double_tap" android:title="@string/pref_lock_double_tap_title" android:summary="@string/pref_lock_double_tap_summary" android:defaultValue="false"/>
<PreferenceScreen android:title="@string/pref_lockable_keys_title" android:summary="@string/pref_lockable_keys_summary">
<CheckBoxPreference android:key="lockable_ctrl" android:title="Ctrl" android:defaultValue="false"/>
<CheckBoxPreference android:key="lockable_alt" android:title="Alt" android:defaultValue="false"/>
<CheckBoxPreference android:key="lockable_fn" android:title="Fn" android:defaultValue="false"/>
<CheckBoxPreference android:key="lockable_meta" android:title="Meta" android:defaultValue="false"/>
<CheckBoxPreference android:key="lockable_sup" android:title="Sup" android:defaultValue="false"/>
<CheckBoxPreference android:key="lockable_sub" android:title="Sub" android:defaultValue="false"/>
<CheckBoxPreference android:key="lockable_box" android:title="Box" android:defaultValue="false"/>
</PreferenceScreen>
<CheckBoxPreference android:key="vibrate_enabled" android:title="@string/pref_vibrate_title" android:summary="@string/pref_vibrate_summary" android:defaultValue="true"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_category_style">

View File

@ -36,7 +36,7 @@ final class Config
public float keyVerticalInterval;
public float keyHorizontalInterval;
public boolean preciseRepeat;
public Set<KeyValue.Modifier> lockable_modifiers = new HashSet<KeyValue.Modifier>();
public boolean double_tap_lock_shift;
public float characterSize; // Ratio
public int accents; // Values are R.values.pref_accents_v_*
public int theme; // Values are R.style.*
@ -139,16 +139,7 @@ final class Config
getDipPref(dm, prefs, "horizontal_margin", horizontalMargin)
+ res.getDimension(R.dimen.extra_horizontal_margin);
preciseRepeat = prefs.getBoolean("precise_repeat", preciseRepeat);
lockable_modifiers.clear();
if (prefs.getBoolean("lock_double_tap", false))
lockable_modifiers.add(KeyValue.Modifier.SHIFT);
if (prefs.getBoolean("lockable_ctrl", false)) lockable_modifiers.add(KeyValue.Modifier.CTRL);
if (prefs.getBoolean("lockable_alt", false)) lockable_modifiers.add(KeyValue.Modifier.ALT);
if (prefs.getBoolean("lockable_fn", false)) lockable_modifiers.add(KeyValue.Modifier.FN);
if (prefs.getBoolean("lockable_meta", false)) lockable_modifiers.add(KeyValue.Modifier.META);
if (prefs.getBoolean("lockable_sup", false)) lockable_modifiers.add(KeyValue.Modifier.SUPERSCRIPT);
if (prefs.getBoolean("lockable_sub", false)) lockable_modifiers.add(KeyValue.Modifier.SUBSCRIPT);
if (prefs.getBoolean("lockable_box", false)) lockable_modifiers.add(KeyValue.Modifier.BOX);
double_tap_lock_shift = prefs.getBoolean("lock_double_tap", false);
characterSize =
prefs.getFloat("character_size", characterSize)
* characterSizeScale;
@ -204,8 +195,12 @@ final class Config
}
break;
case Modifier:
if (lockable_modifiers.contains(key.getModifier()))
switch (key.getModifier())
{
case SHIFT:
if (double_tap_lock_shift)
return key.withFlags(key.getFlags() | KeyValue.FLAG_LOCK);
}
break;
}
return key;