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.customizer; 18 19 import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; 20 21 import java.util.Locale; 22 23 public class EnglishCustomizer extends LayoutCustomizer { 24 public EnglishCustomizer(final Locale locale) { super(locale); } 25 26 @Override 27 public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { 28 return builder 29 // U+00E9: "" LATIN SMALL LETTER E WITH ACUTE 30 // U+00E8: "" LATIN SMALL LETTER E WITH GRAVE 31 // U+00EA: "" LATIN SMALL LETTER E WITH CIRCUMFLEX 32 // U+00EB: "" LATIN SMALL LETTER E WITH DIAERESIS 33 // U+0113: "" LATIN SMALL LETTER E WITH MACRON 34 .setMoreKeysOf("e", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0113") 35 // U+00FA: "" LATIN SMALL LETTER U WITH ACUTE 36 // U+00FB: "" LATIN SMALL LETTER U WITH CIRCUMFLEX 37 // U+00FC: "" LATIN SMALL LETTER U WITH DIAERESIS 38 // U+00F9: "" LATIN SMALL LETTER U WITH GRAVE 39 // U+016B: "" LATIN SMALL LETTER U WITH MACRON 40 .setMoreKeysOf("u", "\u00FA", "\u00FB", "\u00FC", "\u00F9", "\u016B") 41 // U+00ED: "" LATIN SMALL LETTER I WITH ACUTE 42 // U+00EE: "" LATIN SMALL LETTER I WITH CIRCUMFLEX 43 // U+00EF: "" LATIN SMALL LETTER I WITH DIAERESIS 44 // U+012B: "" LATIN SMALL LETTER I WITH MACRON 45 // U+00EC: "" LATIN SMALL LETTER I WITH GRAVE 46 .setMoreKeysOf("i", "\u00ED", "\u00EE", "\u00EF", "\u012B", "\u00EC") 47 // U+00F3: "" LATIN SMALL LETTER O WITH ACUTE 48 // U+00F4: "" LATIN SMALL LETTER O WITH CIRCUMFLEX 49 // U+00F6: "" LATIN SMALL LETTER O WITH DIAERESIS 50 // U+00F2: "" LATIN SMALL LETTER O WITH GRAVE 51 // U+0153: "" LATIN SMALL LIGATURE OE 52 // U+00F8: "" LATIN SMALL LETTER O WITH STROKE 53 // U+014D: "" LATIN SMALL LETTER O WITH MACRON 54 // U+00F5: "" LATIN SMALL LETTER O WITH TILDE 55 .setMoreKeysOf("o", 56 "\u00F3", "\u00F4", "\u00F6", "\u00F2", "\u0153", "\u00F8", "\u014D", 57 "\u00F5") 58 // U+00E1: "" LATIN SMALL LETTER A WITH ACUTE 59 // U+00E2: "" LATIN SMALL LETTER A WITH CIRCUMFLEX 60 // U+00E4: "" LATIN SMALL LETTER A WITH DIAERESIS 61 // U+00E6: "" LATIN SMALL LETTER AE 62 // U+00E3: "" LATIN SMALL LETTER A WITH TILDE 63 // U+00E5: "" LATIN SMALL LETTER A WITH RING ABOVE 64 // U+0101: "" LATIN SMALL LETTER A WITH MACRON 65 .setMoreKeysOf("a", 66 "\u00E0", "\u00E1", "\u00E2", "\u00E4", "\u00E6", "\u00E3", "\u00E5", 67 "\u0101") 68 // U+00DF: "" LATIN SMALL LETTER SHARP S 69 .setMoreKeysOf("s", "\u00DF") 70 // U+00E7: "" LATIN SMALL LETTER C WITH CEDILLA 71 .setMoreKeysOf("c", "\u00E7") 72 // U+00F1: "" LATIN SMALL LETTER N WITH TILDE 73 .setMoreKeysOf("n", "\u00F1"); 74 } 75 } 76