diff options
| author | Jules Aguillon | 2022-10-23 21:51:43 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2022-10-23 21:51:43 +0200 |
| commit | ff0c0354d6395f58da6d7c4d4b5b724fa054e38f (patch) | |
| tree | 053a57e118d8a53a6e558659d4c8d8412ee0cfcb /srcs/juloo.keyboard2/KeyValue.java | |
| parent | 344df4c5c187653248b39a698f534e4d9d251ead (diff) | |
| download | unexpected-keyboard-ff0c0354d6395f58da6d7c4d4b5b724fa054e38f.tar.gz unexpected-keyboard-ff0c0354d6395f58da6d7c4d4b5b724fa054e38f.zip | |
Show keys description in settings
The symbols alone might be hard to understand when scrolling through the
"extra keys" option.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyValue.java')
| -rw-r--r-- | srcs/juloo.keyboard2/KeyValue.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index d6e1ce8..0587278 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -342,6 +342,25 @@ final class KeyValue addPlaceholderKey("f12_placeholder"); } + static final HashMap<String, String> keys_descr = new HashMap<String, String>(); + + /* Some keys have a description attached. Return [null] if otherwise. */ + public static String getKeyDescription(String name) + { + return keys_descr.get(name); + } + + static void addKeyDescr(String name, String descr) + { + keys_descr.put(name, descr); + } + + static { + /* Keys description is shown in the settings. */ + addKeyDescr("capslock", "Caps lock"); + addKeyDescr("switch_greekmath", "Greek & math symbols"); + } + // Substitute for [assert], which has no effect on Android. private static void check(boolean b) { |
