Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bba8629 authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Add yet more keyboard layouts." into jb-dev

parents 2c227f4d 69b2be16
Loading
Loading
Loading
Loading
+40 −6
Original line number Diff line number Diff line
@@ -153,20 +153,26 @@ public class KeyCharacterMap implements Parcelable {
    private static final int ACCENT_BREVE = '\u02D8';
    private static final int ACCENT_CARON = '\u02C7';
    private static final int ACCENT_CEDILLA = '\u00B8';
    private static final int ACCENT_CIRCUMFLEX = '\u02C6';
    private static final int ACCENT_COMMA_ABOVE = '\u1FBD';
    private static final int ACCENT_COMMA_ABOVE_RIGHT = '\u02BC';
    private static final int ACCENT_DOT_ABOVE = '\u02D9';
    private static final int ACCENT_DOT_BELOW = '.'; // approximate
    private static final int ACCENT_DOUBLE_ACUTE = '\u02DD';
    private static final int ACCENT_GRAVE = '\u02CB';
    private static final int ACCENT_CIRCUMFLEX = '\u02C6';
    private static final int ACCENT_HOOK_ABOVE = '\u02C0';
    private static final int ACCENT_HORN = '\''; // approximate
    private static final int ACCENT_MACRON = '\u00AF';
    private static final int ACCENT_MACRON_BELOW = '\u02CD';
    private static final int ACCENT_OGONEK = '\u02DB';
    private static final int ACCENT_REVERSED_COMMA_ABOVE = '\u02BD';
    private static final int ACCENT_RING_ABOVE = '\u02DA';
    private static final int ACCENT_STROKE = '-'; // approximate
    private static final int ACCENT_TILDE = '\u02DC';
    private static final int ACCENT_TURNED_COMMA_ABOVE = '\u02BB';
    private static final int ACCENT_UMLAUT = '\u00A8';
    private static final int ACCENT_VERTICAL_LINE_ABOVE = '\u02C8';
    private static final int ACCENT_VERTICAL_LINE_BELOW = '\u02CC';

    /* Legacy dead key display characters used in previous versions of the API.
     * We still support these characters by mapping them to their non-legacy version. */
@@ -188,11 +194,11 @@ public class KeyCharacterMap implements Parcelable {
        addCombining('\u0306', ACCENT_BREVE);
        addCombining('\u0307', ACCENT_DOT_ABOVE);
        addCombining('\u0308', ACCENT_UMLAUT);
        //addCombining('\u0309', ACCENT_HOOK_ABOVE);
        addCombining('\u0309', ACCENT_HOOK_ABOVE);
        addCombining('\u030A', ACCENT_RING_ABOVE);
        addCombining('\u030B', ACCENT_DOUBLE_ACUTE);
        addCombining('\u030C', ACCENT_CARON);
        //addCombining('\u030D', ACCENT_VERTICAL_LINE_ABOVE);
        addCombining('\u030D', ACCENT_VERTICAL_LINE_ABOVE);
        //addCombining('\u030E', ACCENT_DOUBLE_VERTICAL_LINE_ABOVE);
        //addCombining('\u030F', ACCENT_DOUBLE_GRAVE);
        //addCombining('\u0310', ACCENT_CANDRABINDU);
@@ -201,13 +207,14 @@ public class KeyCharacterMap implements Parcelable {
        addCombining('\u0313', ACCENT_COMMA_ABOVE);
        addCombining('\u0314', ACCENT_REVERSED_COMMA_ABOVE);
        addCombining('\u0315', ACCENT_COMMA_ABOVE_RIGHT);
        //addCombining('\u031B', ACCENT_HORN);
        //addCombining('\u0323', ACCENT_DOT_BELOW);
        addCombining('\u031B', ACCENT_HORN);
        addCombining('\u0323', ACCENT_DOT_BELOW);
        //addCombining('\u0326', ACCENT_COMMA_BELOW);
        addCombining('\u0327', ACCENT_CEDILLA);
        addCombining('\u0328', ACCENT_OGONEK);
        //addCombining('\u0329', ACCENT_VERTICAL_LINE_BELOW);
        addCombining('\u0329', ACCENT_VERTICAL_LINE_BELOW);
        addCombining('\u0331', ACCENT_MACRON_BELOW);
        addCombining('\u0335', ACCENT_STROKE);
        //addCombining('\u0342', ACCENT_PERISPOMENI);
        //addCombining('\u0344', ACCENT_DIALYTIKA_TONOS);
        //addCombining('\u0345', ACCENT_YPOGEGRAMMENI);
@@ -235,6 +242,33 @@ public class KeyCharacterMap implements Parcelable {
     */
    private static final SparseIntArray sDeadKeyCache = new SparseIntArray();
    private static final StringBuilder sDeadKeyBuilder = new StringBuilder();
    static {
        // Non-standard decompositions.
        // Stroke modifier for Finnish multilingual keyboard and others.
        addDeadKey(ACCENT_STROKE, 'D', '\u0110');
        addDeadKey(ACCENT_STROKE, 'G', '\u01e4');
        addDeadKey(ACCENT_STROKE, 'H', '\u0126');
        addDeadKey(ACCENT_STROKE, 'I', '\u0197');
        addDeadKey(ACCENT_STROKE, 'L', '\u0141');
        addDeadKey(ACCENT_STROKE, 'O', '\u00d8');
        addDeadKey(ACCENT_STROKE, 'T', '\u0166');
        addDeadKey(ACCENT_STROKE, 'd', '\u0111');
        addDeadKey(ACCENT_STROKE, 'g', '\u01e5');
        addDeadKey(ACCENT_STROKE, 'h', '\u0127');
        addDeadKey(ACCENT_STROKE, 'i', '\u0268');
        addDeadKey(ACCENT_STROKE, 'l', '\u0142');
        addDeadKey(ACCENT_STROKE, 'o', '\u00f8');
        addDeadKey(ACCENT_STROKE, 't', '\u0167');
    }

    private static void addDeadKey(int accent, int c, int result) {
        final int combining = sAccentToCombining.get(accent);
        if (combining == 0) {
            throw new IllegalStateException("Invalid dead key declaration.");
        }
        final int combination = (combining << 16) | c;
        sDeadKeyCache.put(combination, result);
    }

    public static final Parcelable.Creator<KeyCharacterMap> CREATOR =
            new Parcelable.Creator<KeyCharacterMap>() {
+352 −0
Original line number Diff line number Diff line
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Croatian and Slovenian keyboard layout, QWERTZ style.
#

type OVERLAY

map key 12 SLASH
map key 21 Z
map key 44 Y
map key 53 MINUS
map key 86 PLUS

### ROW 1

key GRAVE {
    label:                              '\u00b8'
    base:                               '\u0327'
    shift:                              '\u0308'
}

key 1 {
    label:                              '1'
    base:                               '1'
    shift:                              '!'
    ralt:                               '\u0303'
}

key 2 {
    label:                              '2'
    base:                               '2'
    shift:                              '"'
    ralt:                               '\u030c'
}

key 3 {
    label:                              '3'
    base:                               '3'
    shift:                              '#'
    ralt:                               '\u0302'
}

key 4 {
    label:                              '4'
    base:                               '4'
    shift:                              '$'
    ralt:                               '\u0306'
}

key 5 {
    label:                              '5'
    base:                               '5'
    shift:                              '%'
    ralt:                               '\u030a'
}

key 6 {
    label:                              '6'
    base:                               '6'
    shift:                              '&'
    ralt:                               '\u0328'
}

key 7 {
    label:                              '7'
    base:                               '7'
    shift:                              '/'
    ralt:                               '\u0300'
}

key 8 {
    label:                              '8'
    base:                               '8'
    shift:                              '('
    ralt:                               '\u0307'
}

key 9 {
    label:                              '9'
    base:                               '9'
    shift:                              ')'
    ralt:                               '\u0301'
}

key 0 {
    label:                              '0'
    base:                               '0'
    shift:                              '='
    ralt:                               '\u030b'
}

key SLASH {
    label:                              '\''
    base:                               '\''
    shift:                              '?'
    ralt:                               '\u0308'
}

key EQUALS {
    label:                              '+'
    base:                               '+'
    shift:                              '*'
    ralt:                               '\u0327'
}

### ROW 2

key Q {
    label:                              'Q'
    base:                               'q'
    shift, capslock:                    'Q'
    ralt:                               '\\'
}

key W {
    label:                              'W'
    base:                               'w'
    shift, capslock:                    'W'
    ralt:                               '|'
}

key E {
    label:                              'E'
    base:                               'e'
    shift, capslock:                    'E'
    ralt:                               '\u20ac'
}

key R {
    label:                              'R'
    base:                               'r'
    shift, capslock:                    'R'
}

key T {
    label:                              'T'
    base:                               't'
    shift, capslock:                    'T'
}

key Z {
    label:                              'Z'
    base:                               'z'
    shift, capslock:                    'Z'
}

key U {
    label:                              'U'
    base:                               'u'
    shift, capslock:                    'U'
}

key I {
    label:                              'I'
    base:                               'i'
    shift, capslock:                    'I'
}

key O {
    label:                              'O'
    base:                               'o'
    shift, capslock:                    'O'
}

key P {
    label:                              'P'
    base:                               'p'
    shift, capslock:                    'P'
}

key LEFT_BRACKET {
    label:                              '\u0160'
    base:                               '\u0161'
    shift, capslock:                    '\u0160'
    ralt:                               '\u00f7'
}

key RIGHT_BRACKET {
    label:                              '\u0110'
    base:                               '\u0111'
    shift, capslock:                    '\u0110'
    ralt:                               '\u00d7'
}

### ROW 3

key A {
    label:                              'A'
    base:                               'a'
    shift, capslock:                    'A'
}

key S {
    label:                              'S'
    base:                               's'
    shift, capslock:                    'S'
}

key D {
    label:                              'D'
    base:                               'd'
    shift, capslock:                    'D'
}

key F {
    label:                              'F'
    base:                               'f'
    shift, capslock:                    'F'
    ralt:                               '['
}

key G {
    label:                              'G'
    base:                               'g'
    shift, capslock:                    'G'
    ralt:                               ']'
}

key H {
    label:                              'H'
    base:                               'h'
    shift, capslock:                    'H'
}

key J {
    label:                              'J'
    base:                               'j'
    shift, capslock:                    'J'
}

key K {
    label:                              'K'
    base:                               'k'
    shift, capslock:                    'K'
    ralt:                               '\u0268'
    ralt+shift, ralt+capslock:          '\u0197'
}

key L {
    label:                              'L'
    base:                               'l'
    shift, capslock:                    'L'
    ralt:                               '\u0142'
    ralt+shift, ralt+capslock:          '\u0141'
}

key SEMICOLON {
    label:                              '\u010d'
    base:                               '\u010c'
    shift, capslock:                    '\u010d'
}

key APOSTROPHE {
    label:                              '\u0106'
    base:                               '\u0107'
    shift, capslock:                    '\u0106'
    ralt:                               '\u00df'
}

key BACKSLASH {
    label:                              '\u017d'
    base:                               '\u017e'
    shift, capslock:                    '\u017d'
    ralt:                               '\u00a4'
}

### ROW 4

key PLUS {
    label:                              '<'
    base:                               '<'
    shift:                              '>'
}

key Y {
    label:                              'Y'
    base:                               'y'
    shift, capslock:                    'Y'
}

key X {
    label:                              'X'
    base:                               'x'
    shift, capslock:                    'X'
}

key C {
    label:                              'C'
    base:                               'c'
    shift, capslock:                    'C'
}

key V {
    label:                              'V'
    base:                               'v'
    shift, capslock:                    'V'
    ralt:                               '@'
}

key B {
    label:                              'B'
    base:                               'b'
    shift, capslock:                    'B'
    ralt:                               '{'
}

key N {
    label:                              'N'
    base:                               'n'
    shift, capslock:                    'N'
    ralt:                               '}'
}

key M {
    label:                              'M'
    base:                               'm'
    shift, capslock:                    'M'
    ralt:                               '\u00a7'
}

key COMMA {
    label:                              ','
    base:                               ','
    shift:                              ';'
    ralt:                               '<'
}

key PERIOD {
    label:                              '.'
    base:                               '.'
    shift:                              ':'
    ralt:                               '>'
}

key MINUS {
    label:                              '-'
    base:                               '-'
    shift:                              '_'
}
+348 −0
Original line number Diff line number Diff line
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Czech keyboard layout.
#

type OVERLAY

map key 86 PLUS

### ROW 1

key GRAVE {
    label:                              ';'
    base:                               ';'
    shift:                              '\u00b0'
}

key 1 {
    label:                              '1'
    base:                               '+'
    shift:                              '1'
    ralt:                               '!'
}

key 2 {
    label:                              '2'
    base:                               '\u011b'
    shift:                              '2'
    ralt:                               '@'
}

key 3 {
    label:                              '3'
    base:                               '\u0161'
    shift:                              '3'
    ralt:                               '#'
}

key 4 {
    label:                              '4'
    base:                               '\u010d'
    shift:                              '4'
    ralt:                               '$'
}

key 5 {
    label:                              '5'
    base:                               '\u0159'
    shift:                              '5'
    ralt:                               '%'
}

key 6 {
    label:                              '6'
    base:                               '\u017e'
    shift:                              '6'
    ralt:                               '^'
}

key 7 {
    label:                              '7'
    base:                               '\u00fd'
    shift:                              '7'
    ralt:                               '&'
}

key 8 {
    label:                              '8'
    base:                               '\u00e1'
    shift:                              '8'
    ralt:                               '*'
}

key 9 {
    label:                              '9'
    base:                               '\u00ed'
    shift:                              '9'
    ralt:                               '('
}

key 0 {
    label:                              '0'
    base:                               '\u00e9'
    shift:                              '0'
    ralt:                               ')'
}

key MINUS {
    label:                              '='
    base:                               '='
    shift:                              '%'
    ralt:                               '-'
    ralt+shift:                         '_'
}

key EQUALS {
    label:                              '\u00b4'
    base:                               '\u0301'
    shift:                              '\u030c'
    ralt:                               '='
    ralt+shift:                         '+'
}

### ROW 2

key Q {
    label:                              'Q'
    base:                               'q'
    shift, capslock:                    'Q'
}

key W {
    label:                              'W'
    base:                               'w'
    shift, capslock:                    'W'
}

key E {
    label:                              'E'
    base:                               'e'
    shift, capslock:                    'E'
    ralt:                               '\u20ac'
}

key R {
    label:                              'R'
    base:                               'r'
    shift, capslock:                    'R'
}

key T {
    label:                              'T'
    base:                               't'
    shift, capslock:                    'T'
}

key Y {
    label:                              'Y'
    base:                               'y'
    shift, capslock:                    'Y'
}

key U {
    label:                              'U'
    base:                               'u'
    shift, capslock:                    'U'
}

key I {
    label:                              'I'
    base:                               'i'
    shift, capslock:                    'I'
}

key O {
    label:                              'O'
    base:                               'o'
    shift, capslock:                    'O'
}

key P {
    label:                              'P'
    base:                               'p'
    shift, capslock:                    'P'
}

key LEFT_BRACKET {
    label:                              '\u00fa'
    base:                               '\u00fa'
    shift:                              '/'
    ralt:                               '['
    ralt+shift:                         '{'
}

key RIGHT_BRACKET {
    label:                              ')'
    base:                               ')'
    shift:                              '('
    ralt:                               ']'
    ralt+shift:                         '}'
}

### ROW 3

key A {
    label:                              'A'
    base:                               'a'
    shift, capslock:                    'A'
}

key S {
    label:                              'S'
    base:                               's'
    shift, capslock:                    'S'
}

key D {
    label:                              'D'
    base:                               'd'
    shift, capslock:                    'D'
}

key F {
    label:                              'F'
    base:                               'f'
    shift, capslock:                    'F'
}

key G {
    label:                              'G'
    base:                               'g'
    shift, capslock:                    'G'
}

key H {
    label:                              'H'
    base:                               'h'
    shift, capslock:                    'H'
}

key J {
    label:                              'J'
    base:                               'j'
    shift, capslock:                    'J'
}

key K {
    label:                              'K'
    base:                               'k'
    shift, capslock:                    'K'
}

key L {
    label:                              'L'
    base:                               'l'
    shift, capslock:                    'L'
}

key SEMICOLON {
    label:                              '\u016f'
    base:                               '\u016f'
    shift:                              '"'
    ralt:                               ';'
    ralt+shift:                         ':'
}

key APOSTROPHE {
    label:                              '\u00a7'
    base:                               '\u00a7'
    shift:                              '!'
    ralt:                               '\''
    ralt+shift:                         '"'
}

key BACKSLASH {
    label:                              '\u0308'
    base:                               '\u0308'
    shift:                              '\''
    ralt:                               '\\'
    ralt+shift:                         '|'
}

### ROW 4

key PLUS {
    label:                              '\\'
    base:                               '\\'
    shift:                              '|'
}

key Z {
    label:                              'Z'
    base:                               'z'
    shift, capslock:                    'Z'
}

key X {
    label:                              'X'
    base:                               'x'
    shift, capslock:                    'X'
}

key C {
    label:                              'C'
    base:                               'c'
    shift, capslock:                    'C'
}

key V {
    label:                              'V'
    base:                               'v'
    shift, capslock:                    'V'
    ralt:                               '@'
}

key B {
    label:                              'B'
    base:                               'b'
    shift, capslock:                    'B'
}

key N {
    label:                              'N'
    base:                               'n'
    shift, capslock:                    'N'
}

key M {
    label:                              'M'
    base:                               'm'
    shift, capslock:                    'M'
    ralt:                               '\u00b5'
}

key COMMA {
    label:                              ','
    base:                               ','
    shift:                              '?'
    ralt:                               '<'
}

key PERIOD {
    label:                              '.'
    base:                               '.'
    shift:                              ':'
    ralt:                               '>'
}

key SLASH {
    label:                              '-'
    base:                               '-'
    shift:                              '_'
    ralt:                               '/'
    ralt+shift:                         '?'
}
+331 −0

File added.

Preview size limit exceeded, changes collapsed.

+336 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading