From c14c3cbc7d179f1879ebdba381fc5e502cfaa164 Mon Sep 17 00:00:00 2001 From: Hagen Echzell Date: Mon, 11 Jan 2021 22:36:53 +0100 Subject: [PATCH] Add German Keyboard with Umlauts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit defines a new keyboard German (Germany) (country code de_DE) that includes the most important Umlauts äöü. The default alternate characters on longpress are set to the numbers, for u and o, since ü and ö have their own keys. ß is the new default alternate char for s. The old German (country code de) keyboard based on a QWERTZ layout without umlauts remains in place. --- .../keyboard/internal/KeyboardTextsTable.java | 69 +++++++++++++++++++ app/src/main/res/xml-sw600dp/rows_german.xml | 63 +++++++++++++++++ app/src/main/res/xml/kbd_german.xml | 26 +++++++ .../res/xml/keyboard_layout_set_german.xml | 43 ++++++++++++ app/src/main/res/xml/method.xml | 9 +++ app/src/main/res/xml/rowkeys_german1.xml | 30 ++++++++ app/src/main/res/xml/rowkeys_german2.xml | 32 +++++++++ app/src/main/res/xml/rowkeys_german3.xml | 30 ++++++++ app/src/main/res/xml/rows_german.xml | 69 +++++++++++++++++++ 9 files changed, 371 insertions(+) create mode 100644 app/src/main/res/xml-sw600dp/rows_german.xml create mode 100644 app/src/main/res/xml/kbd_german.xml create mode 100644 app/src/main/res/xml/keyboard_layout_set_german.xml create mode 100644 app/src/main/res/xml/rowkeys_german1.xml create mode 100644 app/src/main/res/xml/rowkeys_german2.xml create mode 100644 app/src/main/res/xml/rowkeys_german3.xml create mode 100644 app/src/main/res/xml/rows_german.xml diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.java b/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.java index 9b557e45..b7d294dc 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.java @@ -1111,6 +1111,74 @@ public final class KeyboardTextsTable { /* morekeys_swiss_row2_11 */ "\u00E0", }; + /* Locale de: German */ + private static final String[] TEXTS_de_DE = { + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + /* morekeys_a */ "\u00E4,\u00E2,\u00E0,\u00E1,\u00E6,\u00E3,\u00E5,\u0101", + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + /* morekeys_o */ "\u00F6,\u00F4,\u00F2,\u00F3,\u00F5,\u0153,\u00F8,\u014D", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + /* morekeys_e */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0117", + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + /* morekeys_u */ "\u00FC,\u00FB,\u00F9,\u00FA,\u016B", + /* morekeys_i */ null, + /* keylabel_to_alpha */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* morekeys_n */ "\u00F1,\u0144", + /* morekeys_c */ null, + /* double_quotes */ "!text/double_9qm_lqm", + // U+00DF: "ß" LATIN SMALL LETTER SHARP S + // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE + // U+0161: "š" LATIN SMALL LETTER S WITH CARON + /* morekeys_s */ "\u00DF,%,\u015B,\u0161", + /* single_quotes */ "!text/single_9qm_lqm", + /* keyspec_currency ~ */ + null, null, null, null, null, null, null, + /* ~ morekeys_g */ + /* single_angle_quotes */ "!text/single_raqm_laqm", + /* double_angle_quotes */ "!text/double_raqm_laqm", + /* morekeys_r ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, + /* ~ keyspec_tablet_period */ + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + /* keyspec_swiss_row1_11 */ "\u00FC", + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + /* keyspec_swiss_row2_10 */ "\u00F6", + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + /* keyspec_swiss_row2_11 */ "\u00E4", + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + /* morekeys_swiss_row1_11 */ "\u00E8", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + /* morekeys_swiss_row2_10 */ "\u00E9", + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + /* morekeys_swiss_row2_11 */ "\u00E0", + }; + /* Locale el: Greek */ private static final String[] TEXTS_el = { /* morekeys_a ~ */ @@ -4180,6 +4248,7 @@ public final class KeyboardTextsTable { "cs" , TEXTS_cs, /* 17/ 21 Czech */ "da" , TEXTS_da, /* 19/ 55 Danish */ "de" , TEXTS_de, /* 16/ 66 German */ + "de_DE" , TEXTS_de_DE, /* German (Germany) */ "el" , TEXTS_el, /* 1/ 6 Greek */ "en" , TEXTS_en, /* 8/ 10 English */ "eo" , TEXTS_eo, /* 26/126 Esperanto */ diff --git a/app/src/main/res/xml-sw600dp/rows_german.xml b/app/src/main/res/xml-sw600dp/rows_german.xml new file mode 100644 index 00000000..2bb1d6b5 --- /dev/null +++ b/app/src/main/res/xml-sw600dp/rows_german.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/xml/kbd_german.xml b/app/src/main/res/xml/kbd_german.xml new file mode 100644 index 00000000..f4016687 --- /dev/null +++ b/app/src/main/res/xml/kbd_german.xml @@ -0,0 +1,26 @@ + + + + + + diff --git a/app/src/main/res/xml/keyboard_layout_set_german.xml b/app/src/main/res/xml/keyboard_layout_set_german.xml new file mode 100644 index 00000000..31705c0e --- /dev/null +++ b/app/src/main/res/xml/keyboard_layout_set_german.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/app/src/main/res/xml/method.xml b/app/src/main/res/xml/method.xml index 38b861ee..bacf800e 100644 --- a/app/src/main/res/xml/method.xml +++ b/app/src/main/res/xml/method.xml @@ -36,6 +36,7 @@ cs: Czech/qwertz da: Danish/nordic de: German/qwertz + de_DE: German (Germany)/german de_CH: German (Switzerland)/swiss el: Greek/greek en_AU: English (Australia)/qwerty @@ -266,6 +267,14 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=swiss,AsciiCapable,SupportTouchPositionCorrection,EmojiCapable" android:isAsciiCapable="true" /> + + + + + + + + diff --git a/app/src/main/res/xml/rowkeys_german2.xml b/app/src/main/res/xml/rowkeys_german2.xml new file mode 100644 index 00000000..b519c4a4 --- /dev/null +++ b/app/src/main/res/xml/rowkeys_german2.xml @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/app/src/main/res/xml/rowkeys_german3.xml b/app/src/main/res/xml/rowkeys_german3.xml new file mode 100644 index 00000000..8c1220d8 --- /dev/null +++ b/app/src/main/res/xml/rowkeys_german3.xml @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/app/src/main/res/xml/rows_german.xml b/app/src/main/res/xml/rows_german.xml new file mode 100644 index 00000000..cc94add0 --- /dev/null +++ b/app/src/main/res/xml/rows_german.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +