1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.inputmethod.keyboard.layout;
18
19import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer;
20import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
21import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
22
23public final class Swiss extends LayoutBase {
24    private static final String LAYOUT_NAME = "swiss";
25
26    public Swiss(final LayoutCustomizer customizer) {
27        super(customizer, Symbols.class, SymbolsShifted.class);
28    }
29
30    @Override
31    public String getName() { return LAYOUT_NAME; }
32
33    @Override
34    ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; }
35
36    public static final String ROW1_11 = "ROW1_11";
37    public static final String ROW2_10 = "ROW2_10";
38    public static final String ROW2_11 = "ROW2_11";
39
40    private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
41            .setKeysOfRow(1,
42                    key("q", additionalMoreKey("1")),
43                    key("w", additionalMoreKey("2")),
44                    key("e", additionalMoreKey("3")),
45                    key("r", additionalMoreKey("4")),
46                    key("t", additionalMoreKey("5")),
47                    key("z", additionalMoreKey("6")),
48                    key("u", additionalMoreKey("7")),
49                    key("i", additionalMoreKey("8")),
50                    key("o", additionalMoreKey("9")),
51                    key("p", additionalMoreKey("0")),
52                    ROW1_11)
53            .setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10, ROW2_11)
54            .setKeysOfRow(3, "y", "x", "c", "v", "b", "n", "m")
55            .build();
56}
57