abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2
diff options
context:
space:
mode:
authorJules Aguillon2022-01-09 12:49:28 +0100
committerJules Aguillon2022-01-09 12:49:28 +0100
commit93e84ba7e9d1edc3bd57272f58f28c4a308bcaf2 (patch)
tree3789753935607b43d9f4c717f1f145eff8663be4 /srcs/juloo.keyboard2
parent23e59c6b09fdaecc92ae67ee7c5c2936f161696a (diff)
downloadunexpected-keyboard-93e84ba7e9d1edc3bd57272f58f28c4a308bcaf2.tar.gz
unexpected-keyboard-93e84ba7e9d1edc3bd57272f58f28c4a308bcaf2.zip
Add the German language
Add the 'ß' character on the bottom-left corner of the 's' key, which is hidden for other languages. Co-authored-by: Moini <moini@noreply.invalid>
Diffstat (limited to 'srcs/juloo.keyboard2')
-rw-r--r--srcs/juloo.keyboard2/Config.java1
-rw-r--r--srcs/juloo.keyboard2/KeyValue.java14
2 files changed, 12 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java
index 8a2199f..43c039f 100644
--- a/srcs/juloo.keyboard2/Config.java
+++ b/srcs/juloo.keyboard2/Config.java
@@ -118,6 +118,7 @@ final class Config
case "cedille": return KeyValue.FLAG_ACCENT5;
case "trema": return KeyValue.FLAG_ACCENT6;
case "ring": return KeyValue.FLAG_ACCENT_RING;
+ case "szlig": return KeyValue.FLAG_LANG_SZLIG;
default: throw new RuntimeException(name);
}
}
diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java
index 26b3c9e..e2a961c 100644
--- a/srcs/juloo.keyboard2/KeyValue.java
+++ b/srcs/juloo.keyboard2/KeyValue.java
@@ -48,7 +48,9 @@ class KeyValue
FLAG_ACCENT_SUPERSCRIPT | FLAG_ACCENT_SUBSCRIPT | FLAG_ACCENT_RING;
// Language specific keys
- public static final int FLAGS_LANGS = 0;
+ public static final int FLAG_LANG_SZLIG = (1 << 25);
+
+ public static final int FLAGS_LANGS = FLAG_LANG_SZLIG;
public static final int FLAGS_NOT_HIDDEN_ACCENTS = FLAG_ACCENT_SUPERSCRIPT |
FLAG_ACCENT_SUBSCRIPT;
@@ -99,10 +101,15 @@ class KeyValue
keys.put(name, new KeyValue(name, symbol, c, event, flags));
}
- private static void addCharKey(char c, int event)
+ private static void addCharKey(char c, int event, int flags)
{
String name = String.valueOf(c);
- addKey(name, name, c, event, 0);
+ addKey(name, name, c, event, flags);
+ }
+
+ private static void addCharKey(char c, int event)
+ {
+ addCharKey(c, event, 0);
}
private static void addModifierKey(String name, String symbol, int extra_flags)
@@ -199,6 +206,7 @@ class KeyValue
addCharKey('#', KeyEvent.KEYCODE_POUND);
addCharKey('(', KeyEvent.KEYCODE_NUMPAD_LEFT_PAREN);
addCharKey(')', KeyEvent.KEYCODE_NUMPAD_RIGHT_PAREN);
+ addCharKey('ß', EVENT_NONE, FLAG_LANG_SZLIG);
addSpecialKey("config", "Conf", EVENT_CONFIG);
addSpecialKey("switch_text", "ABC", EVENT_SWITCH_TEXT);