abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Config.java
diff options
context:
space:
mode:
authorEdgars2022-01-15 11:13:41 +0200
committerJules Aguillon2022-01-20 22:01:34 +0100
commit0bf7ff5f34eca0ff4b4605b22c418749656db03d (patch)
tree7009ed0e0305b0614ee6f8a123d1f438c181143d /srcs/juloo.keyboard2/Config.java
parentaa12466767178dca4ae9d84bb54cc20330fac638 (diff)
downloadunexpected-keyboard-0bf7ff5f34eca0ff4b4605b22c418749656db03d.tar.gz
unexpected-keyboard-0bf7ff5f34eca0ff4b4605b22c418749656db03d.zip
Add keys for Latvian
New accents - caron and macron - were defined and QWERTY layout was updated to add accents for Latvian specific characters.
Diffstat (limited to 'srcs/juloo.keyboard2/Config.java')
-rw-r--r--srcs/juloo.keyboard2/Config.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java
index f9c6df6..6834733 100644
--- a/srcs/juloo.keyboard2/Config.java
+++ b/srcs/juloo.keyboard2/Config.java
@@ -78,7 +78,7 @@ final class Config
{
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
DisplayMetrics dm = context.getResources().getDisplayMetrics();
- layout = layoutId_of_string(prefs.getString("layout", "system"));
+ layout = layoutId_of_string(prefs.getString("layout", "system"));
swipe_dist_dp = Float.valueOf(prefs.getString("swipe_dist", "15"));
swipe_dist_px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, swipe_dist_dp, dm);
vibrateEnabled = prefs.getBoolean("vibrate_enabled", vibrateEnabled);
@@ -91,7 +91,7 @@ final class Config
keyHeight = getDipPref(dm, prefs, "key_height", keyHeight) + keyVerticalInterval;
horizontalMargin = getDipPref(dm, prefs, "horizontal_margin", horizontalMargin);
preciseRepeat = prefs.getBoolean("precise_repeat", preciseRepeat);
- characterSize = prefs.getFloat("character_size", characterSize);
+ characterSize = prefs.getFloat("character_size", characterSize);
accents = Integer.valueOf(prefs.getString("accents", "1"));
theme = themeId_of_string(prefs.getString("theme", ""));
}
@@ -120,14 +120,16 @@ final class Config
{
switch (name)
{
- case "grave": return KeyValue.FLAG_ACCENT1;
case "aigu": return KeyValue.FLAG_ACCENT2;
- case "circonflexe": return KeyValue.FLAG_ACCENT3;
- case "tilde": return KeyValue.FLAG_ACCENT4;
+ case "caron": return KeyValue.FLAG_ACCENT_CARON;
case "cedille": return KeyValue.FLAG_ACCENT5;
- case "trema": return KeyValue.FLAG_ACCENT6;
+ case "circonflexe": return KeyValue.FLAG_ACCENT3;
+ case "grave": return KeyValue.FLAG_ACCENT1;
+ case "macron": return KeyValue.FLAG_ACCENT_MACRON;
case "ring": return KeyValue.FLAG_ACCENT_RING;
case "szlig": return KeyValue.FLAG_LANG_SZLIG;
+ case "tilde": return KeyValue.FLAG_ACCENT4;
+ case "trema": return KeyValue.FLAG_ACCENT6;
default: throw new RuntimeException(name);
}
}