abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2.java
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2.java27
1 files changed, 13 insertions, 14 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java
index b820b98..2d807cf 100644
--- a/srcs/juloo.keyboard2/Keyboard2.java
+++ b/srcs/juloo.keyboard2/Keyboard2.java
@@ -81,33 +81,32 @@ public class Keyboard2 extends InputMethodService
_currentTextLayout = l;
}
- private int accents_of_subtype(InputMethodSubtype subtype)
+ private int extra_keys_of_subtype(InputMethodSubtype subtype)
{
- String accents_option = subtype.getExtraValueOf("accents");
+ String extra_keys = subtype.getExtraValueOf("extra_keys");
int flags = 0;
- if (accents_option != null)
- for (String acc : accents_option.split("\\|"))
- flags |= Config.accentFlag_of_name(acc);
+ if (extra_keys != null)
+ for (String acc : extra_keys.split("\\|"))
+ flags |= Config.extra_key_flag_of_name(acc);
return flags;
}
private void refreshAccentsOption(InputMethodManager imm, InputMethodSubtype subtype)
{
- final int DONT_REMOVE = KeyValue.FLAG_ACCENT_SUPERSCRIPT | KeyValue.FLAG_ACCENT_SUBSCRIPT;
- int to_keep = DONT_REMOVE;
+ int to_keep = 0;
switch (_config.accents)
{
case 1:
- to_keep |= accents_of_subtype(subtype);
+ to_keep |= extra_keys_of_subtype(subtype);
for (InputMethodSubtype s : getEnabledSubtypes(imm))
- to_keep |= accents_of_subtype(s);
+ to_keep |= extra_keys_of_subtype(s);
break;
- case 2: to_keep |= accents_of_subtype(subtype); break;
- case 3: to_keep = KeyValue.FLAGS_ACCENTS; break;
+ case 2: to_keep |= extra_keys_of_subtype(subtype); break;
+ case 3: to_keep = KeyValue.FLAGS_HIDDEN_KEYS; break;
case 4: break;
default: throw new IllegalArgumentException();
}
- _config.accent_flags_to_remove = ~to_keep & KeyValue.FLAGS_ACCENTS;
+ _config.key_flags_to_remove = ~to_keep & KeyValue.FLAGS_HIDDEN_KEYS;
}
private void refreshSubtypeLegacyFallback()
@@ -115,8 +114,8 @@ public class Keyboard2 extends InputMethodService
// Fallback for the accents option: Only respect the "None" case
switch (_config.accents)
{
- case 1: case 2: case 3: _config.accent_flags_to_remove = 0; break;
- case 4: _config.accent_flags_to_remove = KeyValue.FLAGS_ACCENTS; break;
+ case 1: case 2: case 3: _config.key_flags_to_remove = 0; break;
+ case 4: _config.key_flags_to_remove = KeyValue.FLAGS_HIDDEN_KEYS; break;
}
// Fallback for the layout option: Use qwerty in the "system settings" case
_currentTextLayout = (_config.layout == -1) ? R.xml.qwerty : _config.layout;