Home | History | Annotate | Download | only in customizer
      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.ExpectedKey;
     20 import com.android.inputmethod.latin.common.Constants;
     21 
     22 import java.util.Locale;
     23 
     24 public class DevanagariCustomizer extends LayoutCustomizer {
     25     public DevanagariCustomizer(final Locale locale) { super(locale); }
     26 
     27     @Override
     28     public ExpectedKey getAlphabetKey() { return HINDI_ALPHABET_KEY; }
     29 
     30     @Override
     31     public ExpectedKey getSymbolsKey() { return HINDI_SYMBOLS_KEY; }
     32 
     33     @Override
     34     public ExpectedKey getBackToSymbolsKey() { return HINDI_BACK_TO_SYMBOLS_KEY; }
     35 
     36     // U+0915: "" DEVANAGARI LETTER KA
     37     // U+0916: "" DEVANAGARI LETTER KHA
     38     // U+0917: "" DEVANAGARI LETTER GA
     39     private static final ExpectedKey HINDI_ALPHABET_KEY = key(
     40             "\u0915\u0916\u0917", Constants.CODE_SWITCH_ALPHA_SYMBOL);
     41     // U+0967: "" DEVANAGARI DIGIT ONE
     42     // U+0968: "" DEVANAGARI DIGIT TWO
     43     // U+0969: "" DEVANAGARI DIGIT THREE
     44     private static final String HINDI_SYMBOLS_LABEL = "?\u0967\u0968\u0969";
     45     private static final ExpectedKey HINDI_SYMBOLS_KEY = key(HINDI_SYMBOLS_LABEL,
     46             Constants.CODE_SWITCH_ALPHA_SYMBOL);
     47     private static final ExpectedKey HINDI_BACK_TO_SYMBOLS_KEY = key(HINDI_SYMBOLS_LABEL,
     48             Constants.CODE_SHIFT);
     49 }
     50