diff options
| author | Jules Aguillon | 2024-02-14 22:41:35 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2024-02-14 22:52:25 +0100 |
| commit | d96577963e309c30bfc3e4d840eb5c3145961580 (patch) | |
| tree | db9ab381534fde4a9a6f994b5292f59cff3674af /srcs/juloo.keyboard2/Config.java | |
| parent | f369b5d90bf6e19b0cf145d4ad484df47202ddaa (diff) | |
| download | unexpected-keyboard-d96577963e309c30bfc3e4d840eb5c3145961580.tar.gz unexpected-keyboard-d96577963e309c30bfc3e4d840eb5c3145961580.zip | |
Don't invert the pin entry layout
The pin entry layout shouldn't be inverted as the letter indications
would be meaningless and the order would be opposite to what the option
specifies.
The enter and action key are swapped as the automatic swapping is also
removed.
Diffstat (limited to 'srcs/juloo.keyboard2/Config.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Config.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index 9f95519..e4dbe2b 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -325,6 +325,27 @@ public final class Config }); } + /** Modify the pin entry layout. [main_kw] is used to map the digits into the + same script. */ + public KeyboardData modify_pinentry(KeyboardData kw, KeyboardData main_kw) + { + final KeyModifier.Map_char map_digit = KeyModifier.modify_numpad_script(main_kw.numpad_script); + return kw.mapKeys(new KeyboardData.MapKeyValues() { + public KeyValue apply(KeyValue key, boolean localized) + { + switch (key.getKind()) + { + case Char: + String modified = map_digit.apply(key.getChar()); + if (modified != null) + return key.withSymbol(modified); + break; + } + return key; + } + }); + } + private float get_dip_pref(DisplayMetrics dm, String pref_name, float def) { float value; |
