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 17 package com.android.inputmethod.keyboard.layout; 18 19 import com.android.inputmethod.keyboard.layout.customizer.LayoutCustomizer; 20 import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; 21 import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; 22 23 public final class SerbianQwertz extends LayoutBase { 24 private static final String LAYOUT_NAME = "serbian_qwertz"; 25 26 public SerbianQwertz(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 public static final String ROW3_8 = "ROW3_8"; 40 public static final String ROW3_9 = "ROW3_9"; 41 42 private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() 43 .setKeysOfRow(1, 44 key("q", additionalMoreKey("1")), 45 key("w", additionalMoreKey("2")), 46 key("e", additionalMoreKey("3")), 47 key("r", additionalMoreKey("4")), 48 key("t", additionalMoreKey("5")), 49 key("z", additionalMoreKey("6")), 50 key("u", additionalMoreKey("7")), 51 key("i", additionalMoreKey("8")), 52 key("o", additionalMoreKey("9")), 53 key("p", additionalMoreKey("0")), 54 ROW1_11) 55 .setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10, ROW2_11) 56 .setKeysOfRow(3, "y", "x", "c", "v", "b", "n", "m", ROW3_8, ROW3_9) 57 .build(); 58 } 59