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.EastSlavicCustomizer; 20 import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; 21 import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; 22 23 import java.util.Locale; 24 25 public final class BulgarianBds extends LayoutBase { 26 private static final String LAYOUT_NAME = "bulgarian_bds"; 27 28 public BulgarianBds(final Locale locale) { 29 super(new BulgarianBdsCustomizer(locale), Symbols.class, SymbolsShifted.class); 30 } 31 32 @Override 33 public String getName() { return LAYOUT_NAME; } 34 35 private static class BulgarianBdsCustomizer extends EastSlavicCustomizer { 36 BulgarianBdsCustomizer(final Locale locale) { super(locale); } 37 38 @Override 39 public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; } 40 } 41 42 @Override 43 ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; } 44 45 private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() 46 .setKeysOfRow(1, 47 // U+0443: "" CYRILLIC SMALL LETTER U 48 key("\u0443", moreKey("1")), 49 // U+0435: "" CYRILLIC SMALL LETTER IE 50 key("\u0435", moreKey("2")), 51 // U+0438: "" CYRILLIC SMALL LETTER I 52 // U+045D: "" CYRILLIC SMALL LETTER I WITH GRAVE 53 key("\u0438", joinMoreKeys("3", "\u045D")), 54 // U+0448: "" CYRILLIC SMALL LETTER SHA 55 key("\u0448", moreKey("4")), 56 // U+0449: "" CYRILLIC SMALL LETTER SHCHA 57 key("\u0449", moreKey("5")), 58 // U+043A: "" CYRILLIC SMALL LETTER KA 59 key("\u043A", moreKey("6")), 60 // U+0441: "" CYRILLIC SMALL LETTER ES 61 key("\u0441", moreKey("7")), 62 // U+0434: "" CYRILLIC SMALL LETTER DE 63 key("\u0434", moreKey("8")), 64 // U+0437: "" CYRILLIC SMALL LETTER ZE 65 key("\u0437", moreKey("9")), 66 // U+0446: "" CYRILLIC SMALL LETTER TSE 67 key("\u0446", moreKey("0")), 68 // U+0431: "" CYRILLIC SMALL LETTER BE 69 "\u0431") 70 .setKeysOfRow(2, 71 // U+044C: "" CYRILLIC SMALL LETTER SOFT SIGN 72 // U+044F: "" CYRILLIC SMALL LETTER YA 73 // U+0430: "" CYRILLIC SMALL LETTER A 74 // U+043E: "" CYRILLIC SMALL LETTER O 75 // U+0436: "" CYRILLIC SMALL LETTER ZHE 76 // U+0433: "" CYRILLIC SMALL LETTER GHE 77 // U+0442: "" CYRILLIC SMALL LETTER TE 78 // U+043D: "" CYRILLIC SMALL LETTER EN 79 // U+0432: "" CYRILLIC SMALL LETTER VE 80 // U+043C: "" CYRILLIC SMALL LETTER EM 81 // U+0447: "" CYRILLIC SMALL LETTER CHE 82 "\u044C", "\u044F", "\u0430", "\u043E", "\u0436", "\u0433", "\u0442", "\u043D", 83 "\u0432", "\u043C", "\u0447") 84 .setKeysOfRow(3, 85 // U+044E: "" CYRILLIC SMALL LETTER YU 86 // U+0439: "" CYRILLIC SMALL LETTER SHORT I 87 // U+044A: "" CYRILLIC SMALL LETTER HARD SIGN 88 // U+044D: "" CYRILLIC SMALL LETTER E 89 // U+0444: "" CYRILLIC SMALL LETTER EF 90 // U+0445: "" CYRILLIC SMALL LETTER HA 91 // U+043F: "" CYRILLIC SMALL LETTER PE 92 // U+0440: "" CYRILLIC SMALL LETTER ER 93 // U+043B: "" CYRILLIC SMALL LETTER EL 94 "\u044E", "\u0439", "\u044A", "\u044D", "\u0444", "\u0445", "\u043F", "\u0440", 95 "\u043B") 96 .build(); 97 } 98