Bugfixes, refactoring, add Czech and Hebrew
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eur.cfpifpsi.titanboard.input;
|
||||
package eur.cfpifpsi.titanboard;
|
||||
|
||||
import android.view.KeyEvent;
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eur.cfpifpsi.titanboard.input;
|
||||
package eur.cfpifpsi.titanboard;
|
||||
|
||||
import android.os.Vibrator;
|
||||
import android.view.KeyEvent;
|
||||
@@ -30,7 +30,6 @@ import android.view.inputmethod.InputConnection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import eur.cfpifpsi.titanboard.input.MetaKeyManager;
|
||||
import eur.cfpifpsi.titanboard.input.SymbolInputHandler;
|
||||
import eur.cfpifpsi.titanboard.keymapping.KeymapManager;
|
||||
import eur.cfpifpsi.titanboard.views.InputView;
|
||||
@@ -43,6 +42,7 @@ import eur.cfpifpsi.titanboard.views.InputView;
|
||||
// TODO: Fix up the tweaks popup so it matches in style other UI elements
|
||||
// TODO: Call answering/rejecting like in Pocketboard
|
||||
// TODO: Floating input view
|
||||
// TODO: Make the IME work after reboot, e.g. to type in passwords
|
||||
|
||||
public class TitanboardIME extends InputMethodService {
|
||||
private MetaKeyManager mMetaKeyManager;
|
||||
@@ -67,9 +67,11 @@ public class TitanboardIME extends InputMethodService {
|
||||
@Override
|
||||
public void onInitializeInterface() {
|
||||
mInputView = (InputView) getLayoutInflater().inflate(R.layout.input, null);
|
||||
// These things shouldn't depend on one another like that, this is bound to break
|
||||
// something badly.
|
||||
mClipManager = new ClipManager(this, mPreferenceHolder, mInputView);
|
||||
mInputView.setDependencies(mKeymapManager, mMetaKeyManager, mPreferenceHolder, mClipManager);
|
||||
mSymbolInputHandler = new SymbolInputHandler(mInputView, mVibrator);
|
||||
mClipManager = new ClipManager(this, mPreferenceHolder, mInputView);
|
||||
mInputView.updateStateText();
|
||||
mInputView.setSymbolsVisible(false);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package eur.cfpifpsi.titanboard.keymapping;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import eur.cfpifpsi.titanboard.input.MetaKeyManager;
|
||||
import eur.cfpifpsi.titanboard.MetaKeyManager;
|
||||
|
||||
public class Keymap {
|
||||
private final static int INITIAL_KEYMAP_SIZE = 64; // Enough for just about any QWERTY.
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import eur.cfpifpsi.titanboard.R;
|
||||
import eur.cfpifpsi.titanboard.input.MetaKeyManager;
|
||||
import eur.cfpifpsi.titanboard.MetaKeyManager;
|
||||
|
||||
public class KeymapManager {
|
||||
private final Context mContext;
|
||||
|
||||
@@ -35,7 +35,7 @@ import eur.cfpifpsi.titanboard.PreferenceHolder;
|
||||
import eur.cfpifpsi.titanboard.R;
|
||||
import eur.cfpifpsi.titanboard.SettingsActivity;
|
||||
import eur.cfpifpsi.titanboard.TitanboardIME;
|
||||
import eur.cfpifpsi.titanboard.input.MetaKeyManager;
|
||||
import eur.cfpifpsi.titanboard.MetaKeyManager;
|
||||
import eur.cfpifpsi.titanboard.keymapping.KeymapManager;
|
||||
|
||||
public final class InputView extends RelativeLayout {
|
||||
|
||||
@@ -24,7 +24,7 @@ import android.util.AttributeSet;
|
||||
import android.widget.Button;
|
||||
|
||||
import eur.cfpifpsi.titanboard.R;
|
||||
import eur.cfpifpsi.titanboard.input.MetaKey;
|
||||
import eur.cfpifpsi.titanboard.MetaKey;
|
||||
|
||||
public class StateButton extends Button {
|
||||
public StateButton(Context context, AttributeSet attrs) {
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
<item>Russian (Phonetic)</item>
|
||||
<item>Greek (diacritics under Q)</item>
|
||||
<item>Arabic (Phonetic)</item>
|
||||
<item>Hebrew</item>
|
||||
<item>Czech</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="preferences_languages">
|
||||
@@ -39,6 +41,8 @@
|
||||
<item>ru</item>
|
||||
<item>el</item>
|
||||
<item>ar</item>
|
||||
<item>he</item>
|
||||
<item>cz</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="preferences_language_defaults">
|
||||
|
||||
@@ -1536,4 +1536,341 @@
|
||||
<base>ظ</base>
|
||||
</symbols>
|
||||
</language-keymap>
|
||||
<!-- Hebrew -->
|
||||
<language-keymap>
|
||||
<code>he</code>
|
||||
<latched-code>He</latched-code>
|
||||
<locked-code>HE</locked-code>
|
||||
|
||||
<attached-symbols>
|
||||
<for-symbol>-</for-symbol>
|
||||
<symbol>־</symbol> <!-- Maqaf -->
|
||||
</attached-symbols>
|
||||
<attached-symbols>
|
||||
<for-symbol>'</for-symbol>
|
||||
<symbol>׳</symbol> <!-- Geresh -->
|
||||
</attached-symbols>
|
||||
<attached-symbols>
|
||||
<for-symbol>"</for-symbol>
|
||||
<symbol>”</symbol> <!-- Quotation mark -->
|
||||
<symbol>״</symbol> <!-- Gershayim -->
|
||||
</attached-symbols>
|
||||
<attached-symbols>
|
||||
<for-symbol>,</for-symbol>
|
||||
<symbol>ֽ</symbol> <!-- Meteg -->
|
||||
</attached-symbols>
|
||||
<attached-symbols>
|
||||
<for-symbol>.</for-symbol>
|
||||
<symbol>׃</symbol> <!-- Sof Pasuq -->
|
||||
</attached-symbols>
|
||||
<attached-symbols>
|
||||
<for-symbol>$</for-symbol>
|
||||
<symbol>₪</symbol>
|
||||
</attached-symbols>
|
||||
|
||||
<symbols>
|
||||
<for-code>29</for-code> <!-- A -->
|
||||
<base>ש</base>
|
||||
<shift>ְ</shift> <!-- Sheva -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>30</for-code> <!-- B -->
|
||||
<base>נ</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>31</for-code> <!-- C -->
|
||||
<base>ב</base>
|
||||
<shift>ֱ</shift> <!-- Hataf segol -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>32</for-code> <!-- D -->
|
||||
<base>ג</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>33</for-code> <!-- E -->
|
||||
<base>ק</base>
|
||||
<shift>ָ</shift> <!-- Kamatz -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>34</for-code> <!-- F -->
|
||||
<base>כ</base>
|
||||
<shift>ֿ</shift> <!-- Rafe -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>35</for-code> <!-- G -->
|
||||
<base>ע</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>36</for-code> <!-- H -->
|
||||
<base>י</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>37</for-code> <!-- I -->
|
||||
<base>ן</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>38</for-code> <!-- J -->
|
||||
<base>ח</base>
|
||||
<shift>ִ</shift> <!-- Hiriq -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>39</for-code> <!-- K -->
|
||||
<base>ל</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>40</for-code> <!-- L -->
|
||||
<base>ך</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>41</for-code> <!-- M -->
|
||||
<base>צ</base>
|
||||
<base>ץ</base> <!-- Word-final -->
|
||||
<shift>ֵ</shift> <!-- Tzere -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>42</for-code> <!-- N -->
|
||||
<base>מ</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>43</for-code> <!-- O -->
|
||||
<base>ם</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>44</for-code> <!-- P -->
|
||||
<base>פ</base>
|
||||
<base>ף</base> <!-- Word-final -->
|
||||
<shift>ַ</shift> <!-- Patach -->
|
||||
<shift>ֲ</shift> <!-- Hataf Patach -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>55</for-code> <!-- Q -->
|
||||
<shift>ׂ</shift> <!-- Sin dot -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>46</for-code> <!-- R -->
|
||||
<base>ר</base>
|
||||
<shift>ֳ</shift> <!-- Hataf Kamatz -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>47</for-code> <!-- S -->
|
||||
<base>ד</base>
|
||||
<shift>ּ</shift> <!-- Dagesh -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>48</for-code> <!-- T -->
|
||||
<base>א</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>49</for-code> <!-- U -->
|
||||
<base>ו</base>
|
||||
<base>וּ</base> <!-- Shuruk -->
|
||||
<shift>ֹ</shift> <!-- Holam -->
|
||||
<shift>ֻ</shift> <!-- Kubutz -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>50</for-code> <!-- V -->
|
||||
<base>ה</base>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>51</for-code> <!-- W -->
|
||||
<base>ׁ</base> <!-- Shin dot -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>52</for-code> <!-- X -->
|
||||
<base>ס</base>
|
||||
<shift>ֶ</shift> <!-- Segol -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>53</for-code> <!-- Y -->
|
||||
<base>ט</base>
|
||||
<base>ת</base> <!-- Tav -->
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>54</for-code> <!-- Z -->
|
||||
<base>ז</base>
|
||||
</symbols>
|
||||
</language-keymap>
|
||||
<!-- Czech -->
|
||||
<language-keymap>
|
||||
<code>cz</code>
|
||||
<latched-code>Cz</latched-code>
|
||||
<locked-code>CZ</locked-code>
|
||||
|
||||
<attached-symbols>
|
||||
<for-symbol>"</for-symbol>
|
||||
<symbol>„</symbol>
|
||||
<symbol>“</symbol>
|
||||
<symbol>»</symbol>
|
||||
<symbol>«</symbol>
|
||||
</attached-symbols>
|
||||
<attached-symbols>
|
||||
<for-symbol>'</for-symbol>
|
||||
<symbol>’</symbol>
|
||||
<symbol>‚</symbol>
|
||||
<symbol>‘</symbol>
|
||||
</attached-symbols>
|
||||
|
||||
<symbols>
|
||||
<for-code>29</for-code> <!-- A -->
|
||||
<base>a</base>
|
||||
<base>á</base>
|
||||
<shift>A</shift>
|
||||
<shift>Á</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>30</for-code> <!-- B -->
|
||||
<base>b</base>
|
||||
<shift>B</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>31</for-code> <!-- C -->
|
||||
<base>c</base>
|
||||
<base>č</base>
|
||||
<shift>C</shift>
|
||||
<shift>Č</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>32</for-code> <!-- D -->
|
||||
<base>d</base>
|
||||
<base>ď</base>
|
||||
<shift>D</shift>
|
||||
<shift>Ď</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>33</for-code> <!-- E -->
|
||||
<base>e</base>
|
||||
<base>é</base>
|
||||
<base>ě</base>
|
||||
<shift>E</shift>
|
||||
<shift>É</shift>
|
||||
<shift>Ě</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>34</for-code> <!-- F -->
|
||||
<base>f</base>
|
||||
<shift>F</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>35</for-code> <!-- G -->
|
||||
<base>g</base>
|
||||
<shift>G</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>36</for-code> <!-- H -->
|
||||
<base>h</base>
|
||||
<shift>H</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>37</for-code> <!-- I -->
|
||||
<base>i</base>
|
||||
<base>í</base>
|
||||
<shift>I</shift>
|
||||
<shift>Í</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>38</for-code> <!-- J -->
|
||||
<base>j</base>
|
||||
<shift>J</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>39</for-code> <!-- K -->
|
||||
<base>k</base>
|
||||
<shift>K</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>40</for-code> <!-- L -->
|
||||
<base>l</base>
|
||||
<base>ł</base>
|
||||
<shift>L</shift>
|
||||
<shift>Ł</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>41</for-code> <!-- M -->
|
||||
<base>m</base>
|
||||
<shift>M</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>42</for-code> <!-- N -->
|
||||
<base>n</base>
|
||||
<base>ň</base>
|
||||
<shift>N</shift>
|
||||
<shift>Ň</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>43</for-code> <!-- O -->
|
||||
<base>o</base>
|
||||
<base>ó</base>
|
||||
<shift>O</shift>
|
||||
<shift>Ó</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>44</for-code> <!-- P -->
|
||||
<base>p</base>
|
||||
<shift>P</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>45</for-code> <!-- Q -->
|
||||
<base>q</base>
|
||||
<shift>Q</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>46</for-code> <!-- R -->
|
||||
<base>r</base>
|
||||
<base>ř</base>
|
||||
<shift>R</shift>
|
||||
<shift>Ř</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>47</for-code> <!-- S -->
|
||||
<base>s</base>
|
||||
<base>š</base>
|
||||
<shift>S</shift>
|
||||
<shift>Š</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>48</for-code> <!-- T -->
|
||||
<base>t</base>
|
||||
<base>ť</base>
|
||||
<shift>T</shift>
|
||||
<shift>Ť</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>49</for-code> <!-- U -->
|
||||
<base>u</base>
|
||||
<base>ú</base>
|
||||
<base>ů</base>
|
||||
<shift>U</shift>
|
||||
<shift>Ú</shift>
|
||||
<shift>Ů</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>50</for-code> <!-- V -->
|
||||
<base>v</base>
|
||||
<shift>V</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>51</for-code> <!-- W -->
|
||||
<base>w</base>
|
||||
<shift>W</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>52</for-code> <!-- X -->
|
||||
<base>x</base>
|
||||
<shift>X</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>53</for-code> <!-- Y -->
|
||||
<base>y</base>
|
||||
<base>ý</base>
|
||||
<shift>Y</shift>
|
||||
<shift>Ý</shift>
|
||||
</symbols>
|
||||
<symbols>
|
||||
<for-code>54</for-code> <!-- Z -->
|
||||
<base>z</base>
|
||||
<base>ž</base>
|
||||
<shift>Z</shift>
|
||||
<shift>Ž</shift>
|
||||
</symbols>
|
||||
</language-keymap>
|
||||
</language-keymap-list>
|
||||
Reference in New Issue
Block a user