Add language switching, multiple languages.

This commit is contained in:
2024-10-18 20:26:17 +02:00
parent 72242b0011
commit 2c830ab918
11 changed files with 1154 additions and 438 deletions
@@ -24,12 +24,15 @@ import android.inputmethodservice.InputMethodService;
import android.os.Vibrator;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.util.HashMap;
import java.util.ArrayDeque;
import java.util.Collections;
import java.util.Deque;
// TODO: Implement long-click for extra keys.
// TODO: Implement auto-correct.
@@ -40,7 +43,9 @@ import java.util.HashMap;
public class IME extends InputMethodService {
private MetaKeyManager mMetaKeyManager;
private Keymap mKeymap;
private KeymapManager mKeymapManager;
private Deque<String> mLanguageQueue = new ArrayDeque<>();
private String mCurrentLanguage;
private LinearLayout mInputView;
private Vibrator mVibrator;
@@ -48,8 +53,10 @@ public class IME extends InputMethodService {
public void onCreate() {
super.onCreate();
// Ideally, detect the device, but for now, load all available keymaps.
mKeymap = new Keymap(getResources().getXml(R.xml.keymap_titan_pl));
mKeymapManager = new KeymapManager(getResources().getXml(R.xml.keymaps_titan));
Collections.addAll(mLanguageQueue, mKeymapManager.getAvailableLanguages());
mCurrentLanguage = mLanguageQueue.pop();
mLanguageQueue.addLast(mCurrentLanguage);
mVibrator = (Vibrator) getBaseContext().getSystemService(VIBRATOR_SERVICE);
mMetaKeyManager = new MetaKeyManager(mVibrator);
}
@@ -119,6 +126,12 @@ public class IME extends InputMethodService {
return mInputView;
}
@Override
public void onStartInput(EditorInfo info, boolean restarting) {
super.onStartInput(info, restarting);
updateMetaStateTextView();
}
@Override
public void onFinishInput() {
mMetaKeyManager.resetMetaKeyState();
@@ -127,23 +140,23 @@ public class IME extends InputMethodService {
private String getKey(int keyCode) {
if (mMetaKeyManager.getAlt().isActive()) {
return mKeymap.getKeyAlt(keyCode);
return mKeymapManager.getKeyAlt(mCurrentLanguage, keyCode);
}
if (mMetaKeyManager.getSym().isActive() && mMetaKeyManager.getShift().isActive()) {
return mKeymap.getKeyShiftSym(keyCode);
return mKeymapManager.getKeyShiftSym(mCurrentLanguage, keyCode);
}
if (mMetaKeyManager.getSym().isActive()) {
return mKeymap.getKeySym(keyCode);
return mKeymapManager.getKeySym(mCurrentLanguage, keyCode);
}
if (mMetaKeyManager.getShift().isActive()) {
return mKeymap.getKeyShift(keyCode);
return mKeymapManager.getKeyShift(mCurrentLanguage, keyCode);
}
// Nothing active.
return mKeymap.getKey(keyCode);
return mKeymapManager.getKeyNone(mCurrentLanguage, keyCode);
}
@SuppressLint("SetTextI18n")
@@ -151,6 +164,7 @@ public class IME extends InputMethodService {
TextView shiftStateView = mInputView.findViewById(R.id.state_shift);
TextView altStateView = mInputView.findViewById(R.id.state_alt);
TextView symStateView = mInputView.findViewById(R.id.state_sym);
Button languageButton = mInputView.findViewById(R.id.language_button);
shiftStateView.setText(getStringForMetaKey(
mMetaKeyManager.getShift(), "aa", "Aa", "AA"));
@@ -158,6 +172,7 @@ public class IME extends InputMethodService {
mMetaKeyManager.getAlt(), "..", "#?", "#!"));
symStateView.setText(getStringForMetaKey(
mMetaKeyManager.getSym(), "..", "þπ", "ÞΩ"));
languageButton.setText(mKeymapManager.getShortLabel(mCurrentLanguage));
}
private String getStringForMetaKey(MetaKeyManager.MetaKey key, String normal, String latched, String pressed) {
@@ -172,6 +187,12 @@ public class IME extends InputMethodService {
return normal;
}
public void onInputViewLanguageClick(View v) {
mCurrentLanguage = mLanguageQueue.pop();
mLanguageQueue.addLast(mCurrentLanguage);
updateMetaStateTextView();
}
/**
* @noinspection unused
*/
@@ -1,95 +0,0 @@
/*
* An input method for the Unihertz Titan/physical keyboard phones
* Copyright (C) 2024 Emil Kosz
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
package cfpi_fpsi.eu.titanboard;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.util.HashMap;
public class Keymap extends HashMap<Integer, String[]> {
public Keymap(XmlPullParser parser) {
int code = 0;
String none = null, shift = null, alt = null, sym = null, shiftSym = null;
try {
while (parser.getEventType() != XmlPullParser.END_DOCUMENT) {
int type = parser.getEventType();
if (type == XmlPullParser.START_TAG && parser.getName().equals("key")) {
for (int i = 0; i < parser.getAttributeCount(); ++i) {
String attr = parser.getAttributeName(i);
switch (attr) {
case "code":
code = Integer.parseInt(parser.getAttributeValue(i));
break;
case "none":
none = parser.getAttributeValue(i);
break;
case "shift":
shift = parser.getAttributeValue(i);
break;
case "alt":
alt = parser.getAttributeValue(i);
break;
case "sym":
sym = parser.getAttributeValue(i);
break;
case "shiftSym":
shiftSym = parser.getAttributeValue(i);
break;
}
}
} else if (type == XmlPullParser.END_TAG && parser.getName().equals("key")) {
put(code, new String[]{none, shift, alt, sym, shiftSym});
}
parser.next();
}
} catch (XmlPullParserException | IOException e) {
throw new RuntimeException(e);
}
}
public String getKey(int keyCode) {
String[] values = get(keyCode);
return values != null ? values[0] : null;
}
public String getKeyShift(int keyCode) {
String[] values = get(keyCode);
return values != null ? values[1] : null;
}
public String getKeyAlt(int keyCode) {
String[] values = get(keyCode);
return values != null ? values[2] : null;
}
public String getKeySym(int keyCode) {
String[] values = get(keyCode);
return values != null ? values[3] : null;
}
public String getKeyShiftSym(int keyCode) {
String[] values = get(keyCode);
return values != null ? values[4] : null;
}
}
@@ -19,5 +19,172 @@
package cfpi_fpsi.eu.titanboard;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.util.HashMap;
public class KeymapManager {
// Yeah... I know this is a little wacky.
private final HashMap<String, Keymap> mKeymaps = new HashMap<>();
public KeymapManager(XmlPullParser parser) {
Keymap keymap = null;
String lang = null, shortLabel = null, label = null;
int code = 0;
String none = null, shift = null, alt = null, sym = null, shiftSym = null;
try {
while (parser.getEventType() != XmlPullParser.END_DOCUMENT) {
int type = parser.getEventType();
if (type == XmlPullParser.START_TAG && parser.getName().equals("keymap")) {
keymap = new Keymap();
for (int i = 0; i < parser.getAttributeCount(); ++i) {
switch (parser.getAttributeName(i)) {
case "lang":
lang = parser.getAttributeValue(i);
break;
case "short-label":
shortLabel = parser.getAttributeValue(i);
break;
case "label":
label = parser.getAttributeValue(i);
break;
}
}
} else if (type == XmlPullParser.END_TAG && parser.getName().equals("keymap")) {
keymap.mShortLabel = shortLabel;
keymap.mLabel = label;
mKeymaps.put(lang, keymap);
}
if (type == XmlPullParser.START_TAG && parser.getName().equals("key")) {
for (int i = 0; i < parser.getAttributeCount(); ++i) {
String attr = parser.getAttributeName(i);
switch (attr) {
case "code":
code = Integer.parseInt(parser.getAttributeValue(i));
break;
case "none":
none = parser.getAttributeValue(i);
break;
case "shift":
shift = parser.getAttributeValue(i);
break;
case "alt":
alt = parser.getAttributeValue(i);
break;
case "sym":
sym = parser.getAttributeValue(i);
break;
case "shiftSym":
shiftSym = parser.getAttributeValue(i);
break;
}
}
} else if (type == XmlPullParser.END_TAG && parser.getName().equals("key")) {
keymap.put(code, new Key(none, shift, alt, sym, shiftSym));
}
parser.next();
}
} catch (XmlPullParserException | IOException e) {
throw new RuntimeException(e);
}
}
public String[] getAvailableLanguages() {
return mKeymaps.keySet().toArray(new String[0]);
}
public String getShortLabel(String lang) {
Keymap keymap = mKeymaps.get(lang);
if (keymap != null) {
return keymap.mShortLabel;
} else {
return null;
}
}
public String getKeyNone(String lang, int keyCode) {
Key key = getKey(lang, keyCode);
if (key != null) {
return key.mNone;
} else {
return null;
}
}
public String getKeyShift(String lang, int keyCode) {
Key key = getKey(lang, keyCode);
if (key != null) {
return key.mShift;
} else {
return null;
}
}
public String getKeyAlt(String lang, int keyCode) {
Key key = getKey(lang, keyCode);
if (key != null) {
return key.mAlt;
} else {
return null;
}
}
public String getKeySym(String lang, int keyCode) {
Key key = getKey(lang, keyCode);
if (key != null) {
return key.mSym;
} else {
return null;
}
}
public String getKeyShiftSym(String lang, int keyCode) {
Key key = getKey(lang, keyCode);
if (key != null) {
return key.mShiftSym;
} else {
return null;
}
}
public Key getKey(String lang, int keyCode) {
HashMap<Integer, Key> keymap = mKeymaps.get(lang);
if (keymap != null) {
Key key = keymap.get(keyCode);
if (key != null) {
return key;
} else {
return null;
}
} else {
return null;
}
}
private static class Keymap extends HashMap<Integer, Key> {
public String mShortLabel;
public String mLabel;
}
public static class Key {
public String mNone;
public String mShift;
public String mAlt;
public String mSym;
public String mShiftSym;
public Key(String none, String shift, String alt, String sym, String shiftSym) {
mNone = none;
mShift = shift;
mAlt = alt;
mSym = sym;
mShiftSym = shiftSym;
}
}
}
+16 -1
View File
@@ -37,9 +37,10 @@
tools:ignore="HardcodedText" />
<Button
android:id="@+id/language_button"
style="@style/KeyboardExtraButton"
android:layout_height="wrap_content"
android:text="PL" />
android:onClick="onInputViewLanguageClick" />
</LinearLayout>
@@ -104,6 +105,20 @@
android:text="&gt;"
tools:ignore="HardcodedText" />
<Button
style="@style/KeyboardKey"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="¿"
tools:ignore="HardcodedText" />
<Button
style="@style/KeyboardKey"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="¡"
tools:ignore="HardcodedText" />
<Button
style="@style/KeyboardKey"
android:layout_height="wrap_content"
+6 -46
View File
@@ -5,64 +5,24 @@
android:orientation="vertical">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Languages:" />
<Switch
android:id="@+id/switch1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:text="English" />
<Switch
android:id="@+id/switch3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="German" />
<Switch
android:id="@+id/switch4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="French" />
<Switch
android:id="@+id/switch5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Russian" />
<Switch
android:id="@+id/switch2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Polish" />
<Switch
android:id="@+id/switch6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Greek" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Settings:" />
<Switch
android:id="@+id/switch7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Auto-caps" />
<Switch
android:id="@+id/switch8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Auto-period" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Languages:" />
</LinearLayout>
+1 -1
View File
@@ -1,5 +1,5 @@
<resources>
<string name="app_name">Titanboard</string>
<string name="ime_label">Titanboard</string>
<string name="preferences_label">Preferences</string>
<string name="preferences_label">Titanboard preferences</string>
</resources>
-1
View File
@@ -31,7 +31,6 @@
<item name="android:layout_marginTop">2dp</item>
<item name="android:layout_marginBottom">2dp</item>
<item name="android:layout_width">48dp</item>
<item name="android:layout_gravity">right</item>
</style>
<style name="KeyboardStateLocked" parent="KeyboardState">
-133
View File
@@ -1,133 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<keymap>
<key
code="29"
none="a"
shift="A"
alt="@" />
<key
code="30"
none="b"
shift="B"
alt="7" />
<key
code="31"
none="c"
shift="C"
alt="," />
<key
code="32"
none="d"
shift="D"
alt="&quot;" />
<key
code="33"
none="e"
shift="E"
alt="_" />
<key
code="34"
none="f"
shift="F"
alt="+" />
<key
code="35"
none="g"
shift="G"
alt="*" />
<key
code="36"
none="h"
shift="H"
alt="#" />
<key
code="37"
none="i"
shift="I"
alt="2" />
<key
code="38"
none="j"
shift="J"
alt="4" />
<key
code="39"
none="k"
shift="K"
alt="5" />
<key
code="40"
none="l"
shift="L"
alt="6" />
<key
code="41"
none="m"
shift="M"
alt="9" />
<key
code="42"
none="n"
shift="N"
alt="8" />
<key
code="43"
none="o"
shift="O"
alt="3" />
<key
code="44"
none="p"
shift="P"
alt="0" />
<key
code="45"
none="q"
shift="Q"
alt=":" />
<key
code="46"
none="r"
shift="R"
alt="-" />
<key
code="47"
none="s"
shift="S"
alt="&apos;" />
<key
code="48"
none="t"
shift="T"
alt="(" />
<key
code="49"
none="u"
shift="U"
alt="1" />
<key
code="50"
none="v"
shift="V"
alt="." />
<key
code="51"
none="w"
shift="W"
alt="/" />
<key
code="52"
none="x"
shift="X"
alt="?" />
<key
code="53"
none="y"
shift="Y"
alt=")" />
<key
code="54"
none="z"
shift="Z"
alt="!" />
</keymap>
-151
View File
@@ -1,151 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<keymap>
<key
code="29"
none="a"
shift="A"
alt="@"
sym="ą"
shiftSym="Ą" />
<key
code="30"
none="b"
shift="B"
alt="7" />
<key
code="31"
none="c"
shift="C"
alt=","
sym="ć"
shiftSym="Ć" />
<key
code="32"
none="d"
shift="D"
alt="&quot;" />
<key
code="33"
none="e"
shift="E"
alt="_"
sym="ę"
shiftSym="Ę" />
<key
code="34"
none="f"
shift="F"
alt="+" />
<key
code="35"
none="g"
shift="G"
alt="*" />
<key
code="36"
none="h"
shift="H"
alt="#" />
<key
code="37"
none="i"
shift="I"
alt="2" />
<key
code="38"
none="j"
shift="J"
alt="4" />
<key
code="39"
none="k"
shift="K"
alt="5" />
<key
code="40"
none="l"
shift="L"
alt="6"
sym="ł"
shiftSym="Ł" />
<key
code="41"
none="m"
shift="M"
alt="9" />
<key
code="42"
none="n"
shift="N"
alt="8"
sym="ń"
shiftSym="Ń" />
<key
code="43"
none="o"
shift="O"
alt="3"
sym="ó"
shiftSym="Ó" />
<key
code="44"
none="p"
shift="P"
alt="0" />
<key
code="45"
none="q"
shift="Q"
alt=":" />
<key
code="46"
none="r"
shift="R"
alt="-" />
<key
code="47"
none="s"
shift="S"
alt="&apos;"
sym="ś"
shiftSym="Ś" />
<key
code="48"
none="t"
shift="T"
alt="(" />
<key
code="49"
none="u"
shift="U"
alt="1" />
<key
code="50"
none="v"
shift="V"
alt="." />
<key
code="51"
none="w"
shift="W"
alt="/" />
<key
code="52"
none="x"
shift="X"
alt="?"
sym="ź"
shiftSym="Ź" />
<key
code="53"
none="y"
shift="Y"
alt=")" />
<key
code="54"
none="z"
shift="Z"
alt="!"
sym="ż"
shiftSym="Ż" />
</keymap>
+927
View File
@@ -0,0 +1,927 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ An input method for the Unihertz Titan/physical keyboard phones
~ Copyright (C) 2024 Emil Kosz
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
~
-->
<keymap-list>
<!-- Spanish-->
<keymap
label="Spanish"
lang="es_ES"
short-label="ES">
<key
alt="@"
code="29"
none="a"
shift="A"
shiftSym="Á"
sym="á" />
<key
alt="7"
code="30"
none="b"
shift="B" />
<key
alt=","
code="31"
none="c"
shift="C"
shiftSym="Ç"
sym="ç" />
<key
alt="&quot;"
code="32"
none="d"
shift="D" />
<key
alt="_"
code="33"
none="e"
shift="E"
shiftSym="É"
sym="é" />
<key
alt="+"
code="34"
none="f"
shift="F" />
<key
alt="*"
code="35"
none="g"
shift="G" />
<key
alt="#"
code="36"
none="h"
shift="H" />
<key
alt="2"
code="37"
none="i"
shift="I"
shiftSym="Í"
sym="í" />
<key
alt="4"
code="38"
none="j"
shift="J" />
<key
alt="5"
code="39"
none="k"
shift="K" />
<key
alt="6"
code="40"
none="l"
shift="L" />
<key
alt="9"
code="41"
none="m"
shift="M" />
<key
alt="8"
code="42"
none="n"
shift="N"
shiftSym="Ñ"
sym="ñ" />
<key
alt="3"
code="43"
none="o"
shift="O"
shiftSym="Ó"
sym="ó" />
<key
alt="0"
code="44"
none="p"
shift="P" />
<key
alt=":"
code="45"
none="q"
shift="Q" />
<key
alt="-"
code="46"
none="r"
shift="R" />
<key
alt="&apos;"
code="47"
none="s"
shift="S" />
<key
alt="("
code="48"
none="t"
shift="T" />
<key
alt="1"
code="49"
none="u"
shift="U"
shiftSym="Ú"
sym="ú" />
<key
alt="."
code="50"
none="v"
shift="V" />
<key
alt="/"
code="51"
none="w"
shift="W" />
<key
alt="?"
code="52"
none="x"
shift="X" />
<key
alt=")"
code="53"
none="y"
shift="Y" />
<key
alt="!"
code="54"
none="z"
shift="Z" />
</keymap>
<!-- French-->
<keymap
label="French"
lang="fr_FR"
short-label="FR">
<!-- A-->
<key
alt="@"
code="29"
none="q"
shift="Q" />
<key
alt="7"
code="30"
none="b"
shift="B" />
<key
alt=","
code="31"
none="c"
shift="C"
shiftSym="Ç"
sym="ç" />
<key
alt="&quot;"
code="32"
none="d"
shift="D" />
<key
alt="_"
code="33"
none="e"
shift="E"
shiftSym="É"
sym="é" />
<key
alt="+"
code="34"
none="f"
shift="F" />
<key
alt="*"
code="35"
none="g"
shift="G" />
<key
alt="#"
code="36"
none="h"
shift="H" />
<key
alt="2"
code="37"
none="i"
shift="I"
shiftSym="Î"
sym="î" />
<key
alt="4"
code="38"
none="j"
shift="J" />
<key
alt="5"
code="39"
none="k"
shift="K" />
<key
alt="6"
code="40"
none="l"
shift="L" />
<key
alt="9"
code="41"
none="m"
shift="M" />
<key
alt="8"
code="42"
none="n"
shift="N" />
<key
alt="3"
code="43"
none="o"
shift="O"
shiftSym="Ô"
sym="ô" />
<key
alt="0"
code="44"
none="p"
shift="P" />
<!-- Q-->
<key
alt=":"
code="45"
none="a"
shift="A"
shiftSym="À"
sym="à" />
<key
alt="-"
code="46"
none="r"
shift="R" />
<key
alt="&apos;"
code="47"
none="s"
shift="S" />
<key
alt="("
code="48"
none="t"
shift="T" />
<key
alt="1"
code="49"
none="u"
shift="U"
shiftSym="Ù"
sym="ù" />
<key
alt="."
code="50"
none="v"
shift="V" />
<!-- W-->
<key
alt="/"
code="51"
none="z"
shift="Z" />
<key
alt="?"
code="52"
none="x"
shift="X" />
<key
alt=")"
code="53"
none="y"
shift="Y"
shiftSym="Ÿ"
sym="ÿ" />
<!-- Z-->
<key
alt="!"
code="54"
none="w"
shift="W" />
</keymap>
<!-- Polish-->
<keymap
label="Polish"
lang="pl_PL"
short-label="PL">
<key
alt="@"
code="29"
none="a"
shift="A"
shiftSym="Ą"
sym="ą" />
<key
alt="7"
code="30"
none="b"
shift="B" />
<key
alt=","
code="31"
none="c"
shift="C"
shiftSym="Ć"
sym="ć" />
<key
alt="&quot;"
code="32"
none="d"
shift="D" />
<key
alt="_"
code="33"
none="e"
shift="E"
shiftSym="Ę"
sym="ę" />
<key
alt="+"
code="34"
none="f"
shift="F" />
<key
alt="*"
code="35"
none="g"
shift="G" />
<key
alt="#"
code="36"
none="h"
shift="H" />
<key
alt="2"
code="37"
none="i"
shift="I" />
<key
alt="4"
code="38"
none="j"
shift="J" />
<key
alt="5"
code="39"
none="k"
shift="K" />
<key
alt="6"
code="40"
none="l"
shift="L"
shiftSym="Ł"
sym="ł" />
<key
alt="9"
code="41"
none="m"
shift="M" />
<key
alt="8"
code="42"
none="n"
shift="N"
shiftSym="Ń"
sym="ń" />
<key
alt="3"
code="43"
none="o"
shift="O"
shiftSym="Ó"
sym="ó" />
<key
alt="0"
code="44"
none="p"
shift="P" />
<key
alt=":"
code="45"
none="q"
shift="Q" />
<key
alt="-"
code="46"
none="r"
shift="R" />
<key
alt="&apos;"
code="47"
none="s"
shift="S"
shiftSym="Ś"
sym="ś" />
<key
alt="("
code="48"
none="t"
shift="T" />
<key
alt="1"
code="49"
none="u"
shift="U" />
<key
alt="."
code="50"
none="v"
shift="V" />
<key
alt="/"
code="51"
none="w"
shift="W" />
<key
alt="?"
code="52"
none="x"
shift="X"
shiftSym="Ź"
sym="ź" />
<key
alt=")"
code="53"
none="y"
shift="Y" />
<key
alt="!"
code="54"
none="z"
shift="Z"
shiftSym="Ż"
sym="ż" />
</keymap>
<!-- Greek-->
<keymap
label="Greek"
lang="gr_GR"
short-label="GR">
<key
alt="@"
code="29"
none="α"
shift="Α" />
<key
alt="7"
code="30"
none="β"
shift="Β" />
<!-- C-->
<key
alt=","
code="31"
none="ψ"
shift="Ψ" />
<key
alt="&quot;"
code="32"
none="δ"
shift="Δ" />
<key
alt="_"
code="33"
none="ε"
shift="E" />
<key
alt="+"
code="34"
none="φ"
shift="Φ" />
<key
alt="*"
code="35"
none="γ"
shift="Γ" />
<key
alt="#"
code="36"
none="η"
shift="H" />
<key
alt="2"
code="37"
none="ι"
shift="I" />
<key
alt="4"
code="38"
none="ξ"
shift="Ξ" />
<key
alt="5"
code="39"
none="κ"
shift="K" />
<key
alt="6"
code="40"
none="λ"
shift="Λ" />
<key
alt="9"
code="41"
none="μ"
shift="M" />
<key
alt="8"
code="42"
none="ν"
shift="N" />
<key
alt="3"
code="43"
none="o"
shift="O" />
<key
alt="0"
code="44"
none="π"
shift="Π" />
<key
alt=":"
code="45"
none=";"
shift=":" />
<key
alt="-"
code="46"
none="ρ"
shift="Ρ" />
<key
alt="&apos;"
code="47"
none="σ"
shift="Σ" />
<key
alt="("
code="48"
none="τ"
shift="T" />
<key
alt="1"
code="49"
none="θ"
shift="Θ" />
<key
alt="."
code="50"
none="ω"
shift="Ω" />
<key
alt="/"
code="51"
none="ς" />
<key
alt="?"
code="52"
none="χ"
shift="X" />
<key
alt=")"
code="53"
none="υ"
shift="Y" />
<key
alt="!"
code="54"
none="ζ"
shift="Z" />
</keymap>
<!-- Russian-->
<keymap
label="Russian"
lang="ru_RU"
short-label="RU">
<!-- A-->
<key
alt="@"
code="29"
none="ф"
shift="Ф" />
<!-- B-->
<key
alt="7"
code="30"
none="и"
shift="И"
sym="ё"
shiftSym="Ё" />
<!-- C-->
<key
alt=","
code="31"
none="c"
shift="C" />
<!-- D-->
<key
alt="&quot;"
code="32"
none="в"
shift="В"
sym="б"
shiftSym="Б" />
<!-- E-->
<key
alt="_"
code="33"
none="у"
shift="У" />
<!-- F-->
<key
alt="+"
code="34"
none="a"
shift="A" />
<!-- G-->
<key
alt="*"
code="35"
none="п"
shift="П" />
<!-- H-->
<key
alt="#"
code="36"
none="р"
shift="Р" />
<!-- I-->
<key
alt="2"
code="37"
none="ш"
shift="Ш" />
<!-- J-->
<key
alt="4"
code="38"
none="o"
shift="O" />
<!-- K-->
<key
alt="5"
code="39"
none="л"
shift="Л" />
<!-- L-->
<key
alt="6"
code="40"
none="д"
shift="Д" />
<!-- M-->
<key
alt="9"
code="41"
none="ь"
shift="Ь"
sym="ъ"
shiftSym="Ъ" />
<!-- N-->
<key
alt="8"
code="42"
none="т"
shift="T" />
<!-- O-->
<key
alt="3"
code="43"
none="щ"
shift="Щ" />
<!-- P, — z & ż -->
<key
alt="0"
code="44"
none="з"
shift="З"
sym="ж"
shiftSym="Ж" />
<!-- Q-->
<key
alt=":"
code="45"
none="й"
shift="Й"
sym="ю"
shiftSym="Ю" />
<!-- R-->
<key
alt="-"
code="46"
none="к"
shift="K"
sym="х"
shiftSym="Х" />
<!-- S-->
<key
alt="&apos;"
code="47"
none="ы"
shift="Ы" />
<!-- T-->
<key
alt="("
code="48"
none="e"
shift="E"
sym="э"
shiftSym="Э" />
<!-- U-->
<key
alt="1"
code="49"
none="г"
shift="Г" />
<!-- V-->
<key
alt="."
code="50"
none="м"
shift="M" />
<!-- W-->
<key
alt="/"
code="51"
none="ц"
shift="Ц" />
<!-- X-->
<key
alt="?"
code="52"
none="ч"
shift="Ч" />
<!-- Y-->
<key
alt=")"
code="53"
none="н"
shift="Н" />
<!-- Z-->
<key
alt="!"
code="54"
none="я"
shift="Я" />
</keymap>
<!-- English (US)-->
<keymap
label="English"
lang="en_US"
short-label="US">
<key
alt="@"
code="29"
none="a"
shift="A" />
<key
alt="7"
code="30"
none="b"
shift="B" />
<key
alt=","
code="31"
none="c"
shift="C" />
<key
alt="&quot;"
code="32"
none="d"
shift="D" />
<key
alt="_"
code="33"
none="e"
shift="E" />
<key
alt="+"
code="34"
none="f"
shift="F" />
<key
alt="*"
code="35"
none="g"
shift="G" />
<key
alt="#"
code="36"
none="h"
shift="H" />
<key
alt="2"
code="37"
none="i"
shift="I" />
<key
alt="4"
code="38"
none="j"
shift="J" />
<key
alt="5"
code="39"
none="k"
shift="K" />
<key
alt="6"
code="40"
none="l"
shift="L" />
<key
alt="9"
code="41"
none="m"
shift="M" />
<key
alt="8"
code="42"
none="n"
shift="N" />
<key
alt="3"
code="43"
none="o"
shift="O" />
<key
alt="0"
code="44"
none="p"
shift="P" />
<key
alt=":"
code="45"
none="q"
shift="Q" />
<key
alt="-"
code="46"
none="r"
shift="R" />
<key
alt="&apos;"
code="47"
none="s"
shift="S" />
<key
alt="("
code="48"
none="t"
shift="T" />
<key
alt="1"
code="49"
none="u"
shift="U" />
<key
alt="."
code="50"
none="v"
shift="V" />
<key
alt="/"
code="51"
none="w"
shift="W" />
<key
alt="?"
code="52"
none="x"
shift="X" />
<key
alt=")"
code="53"
none="y"
shift="Y" />
<key
alt="!"
code="54"
none="z"
shift="Z" />
</keymap>
</keymap-list>
+7 -1
View File
@@ -1,3 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<input-method xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="cfpi_fpsi.eu.titanboard.PreferencesActivity" />
android:settingsActivity="cfpi_fpsi.eu.titanboard.PreferencesActivity"
android:supportsSwitchingToNextInputMethod="false ">
<subtype
android:label="Default"
android:isAsciiCapable="true"
android:imeSubtypeMode="keyboard" />
</input-method>