mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-08-17 23:19:58 +02:00
Compare commits
6 Commits
manifest-s
...
1.26.0
Author | SHA1 | Date | |
---|---|---|---|
|
5d1a503210 | ||
|
d1aa59768d | ||
|
2c52e94e0b | ||
|
3adf95a4c9 | ||
|
44f39059e4 | ||
|
bbc6226839 |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:hardwareAccelerated="false">
|
||||
<application android:label="@string/app_name" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:hardwareAccelerated="false" android:supportsRtl="true">
|
||||
<application android:label="@string/app_name" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:hardwareAccelerated="false">
|
||||
<service android:name="juloo.keyboard2.Keyboard2" android:label="@string/app_name" android:permission="android.permission.BIND_INPUT_METHOD" android:exported="true" android:directBootAware="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.view.InputMethod"/>
|
||||
@@ -21,10 +21,11 @@
|
||||
</application>
|
||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
|
||||
<!-- To query enabled input methods for voice IME detection -->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.view.InputMethod"/>
|
||||
<action android:name="android.view.InputMethod" />
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
|
@@ -10,8 +10,8 @@ android {
|
||||
applicationId "juloo.keyboard2"
|
||||
minSdk 4
|
||||
targetSdkVersion 33
|
||||
versionCode 37
|
||||
versionName "1.25.0"
|
||||
versionCode 38
|
||||
versionName "1.26.0"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
@@ -2,6 +2,10 @@
|
||||
Layout includes some ASCII punctuation but not all, missing: !, ", ', +, -, /, :, ;, <, =, >, ?, [, \, ], _, |, ~
|
||||
Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder
|
||||
2 warnings
|
||||
# arab_hamvaj_tly
|
||||
Layout includes some ASCII punctuation but not all, missing: ", %, ', ,, /, ;, <, =, >, ?, [, \, ], _, `, {, |, }
|
||||
Layout doesn't define some important keys, missing: esc, f11_placeholder, f12_placeholder
|
||||
2 warnings
|
||||
# arab_pc
|
||||
Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, |
|
||||
1 warnings
|
||||
@@ -91,6 +95,10 @@ Layout doesn't define some important keys, missing: f11_placeholder, f12_placeho
|
||||
# latn_qwerty_se
|
||||
Duplicate keys: !, ', ,, -, ., ?
|
||||
1 warnings
|
||||
# latn_qwerty_tly
|
||||
Duplicate keys: a, c, g, j, q
|
||||
Layout doesn't define some important keys, missing: esc, f11_placeholder, f12_placeholder, tab
|
||||
2 warnings
|
||||
# latn_qwerty_tr
|
||||
Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder
|
||||
1 warnings
|
||||
|
7
metadata/android/en-US/changelogs/38.txt
Normal file
7
metadata/android/en-US/changelogs/38.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
The custom vibration setting is back.
|
||||
Allow to hide the keyboard switching key.
|
||||
Fixed modifier keys in some development apps.
|
||||
Updated translations.
|
||||
Bug fixes and general improvements.
|
||||
|
||||
Many thanks to the contributors: @abb128, @marciozomb13, @RetrogisusDEV, @Sestowner, @vedamanavi, @krtsgnr7230
|
@@ -7,6 +7,7 @@
|
||||
<item>latn_colemak</item>
|
||||
<item>latn_dvorak</item>
|
||||
<item>arab_alt</item>
|
||||
<item>arab_hamvaj_tly</item>
|
||||
<item>arab_pc</item>
|
||||
<item>arab_pc_ckb</item>
|
||||
<item>arab_pc_hindu</item>
|
||||
@@ -37,6 +38,7 @@
|
||||
<item>latn_qwerty_pl</item>
|
||||
<item>latn_qwerty_ro</item>
|
||||
<item>latn_qwerty_se</item>
|
||||
<item>latn_qwerty_tly</item>
|
||||
<item>latn_qwerty_tr</item>
|
||||
<item>latn_qwerty_vi</item>
|
||||
<item>latn_qwertz</item>
|
||||
@@ -55,6 +57,7 @@
|
||||
<item>Colemak</item>
|
||||
<item>Dvorak</item>
|
||||
<item>Arabic Alt</item>
|
||||
<item>Talysh (تالشی همواج)</item>
|
||||
<item>Arabic PC</item>
|
||||
<item>Kurdish (کوردی)</item>
|
||||
<item>Arabic PC (Hindu numerals)</item>
|
||||
@@ -85,6 +88,7 @@
|
||||
<item>QWERTY (Polski)</item>
|
||||
<item>QWERTY (Română)</item>
|
||||
<item>QWERTY (Swedish)</item>
|
||||
<item>QWERTY (Talysh New Latin)</item>
|
||||
<item>QWERTY (Türkçe)</item>
|
||||
<item>QWERTY (Vietnamese)</item>
|
||||
<item>QWERTZ</item>
|
||||
@@ -103,6 +107,7 @@
|
||||
<item>@xml/latn_colemak</item>
|
||||
<item>@xml/latn_dvorak</item>
|
||||
<item>@xml/arab_alt</item>
|
||||
<item>@xml/arab_hamvaj_tly</item>
|
||||
<item>@xml/arab_pc</item>
|
||||
<item>@xml/arab_pc_ckb</item>
|
||||
<item>@xml/arab_pc_hindu</item>
|
||||
@@ -133,6 +138,7 @@
|
||||
<item>@xml/latn_qwerty_pl</item>
|
||||
<item>@xml/latn_qwerty_ro</item>
|
||||
<item>@xml/latn_qwerty_se</item>
|
||||
<item>@xml/latn_qwerty_tly</item>
|
||||
<item>@xml/latn_qwerty_tr</item>
|
||||
<item>@xml/latn_qwerty_vi</item>
|
||||
<item>@xml/latn_qwertz</item>
|
||||
|
@@ -34,6 +34,7 @@
|
||||
<subtype android:label="%s" android:languageTag="sk" android:imeSubtypeLocale="sk_SK" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwertz_sk,extra_keys=accent_caron:ě:ř:ž:š:č:ň:ď:ľ:ť|accent_ring:ů|accent_circonflexe:ô|accent_trema:ä:ü:ö|accent_aigu:á:é:í:ó:ú:ŕ:ś:ĺ:ý"/>
|
||||
<subtype android:label="%s" android:languageTag="sv" android:imeSubtypeLocale="sv_SE" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_se,extra_keys=accent_aigu:á|accent_trema:ä:ö|accent_ring:å|€"/>
|
||||
<subtype android:label="%s" android:languageTag="tr" android:imeSubtypeLocale="tr_TR" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_tr,extra_keys=accent_cedille:ç:ş|accent_trema:ö:ü|accent_circonflexe:â:î:û|₺|ı|ğ"/>
|
||||
<subtype android:label="%s" android:languageTag="tly" android:imeSubtypeLocale="tly_AZ" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_tly,extra_keys=á|ú|â|ê|ı|š|ž"/>
|
||||
<subtype android:label="%s" android:languageTag="uk" android:imeSubtypeLocale="uk_UA" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=cyrillic,default_layout=cyrl_jcuken_uk,extra_keys=ґ|є|і|ї|₴"/>
|
||||
<subtype android:label="%s" android:languageTag="vi" android:imeSubtypeLocale="vi_VN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_vi"/>
|
||||
</input-method>
|
||||
|
@@ -44,7 +44,7 @@
|
||||
<juloo.keyboard2.prefs.IntSlideBarPreference android:key="horizontal_margin_landscape" android:title="@string/pref_landscape" android:summary="%sdp" android:defaultValue="28" min="0" max="200"/>
|
||||
</PreferenceScreen>
|
||||
<juloo.keyboard2.prefs.SlideBarPreference android:key="character_size" android:title="@string/pref_character_size_title" android:summary="@string/pref_character_size_summary" android:defaultValue="1.0" min="0.75" max="1.5"/>
|
||||
<juloo.keyboard2.prefs.IntSlideBarPreference android:key="key_vertical_space" android:title="@string/pref_key_vertical_space" android:summary="%sdp" android:defaultValue="2" min="0" max="8"/>
|
||||
<juloo.keyboard2.prefs.IntSlideBarPreference android:key="key_horizontal_space" android:title="@string/pref_key_horizontal_space" android:summary="%sdp" android:defaultValue="2" min="0" max="8"/>
|
||||
<juloo.keyboard2.prefs.SlideBarPreference android:key="key_vertical_margin" android:title="@string/pref_key_vertical_space" android:summary="%s%%" android:defaultValue="1.5" min="0" max="5"/>
|
||||
<juloo.keyboard2.prefs.SlideBarPreference android:key="key_horizontal_margin" android:title="@string/pref_key_horizontal_space" android:summary="%s%%" android:defaultValue="2" min="0" max="5"/>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
@@ -47,8 +47,8 @@ public final class Config
|
||||
public float margin_bottom;
|
||||
public float keyHeight;
|
||||
public float horizontal_margin;
|
||||
public float keyVerticalInterval;
|
||||
public float keyHorizontalInterval;
|
||||
public float key_vertical_margin;
|
||||
public float key_horizontal_margin;
|
||||
public int labelBrightness; // 0 - 255
|
||||
public int keyboardOpacity; // 0 - 255
|
||||
public int keyOpacity; // 0 - 255
|
||||
@@ -105,8 +105,6 @@ public final class Config
|
||||
// The height of the keyboard is relative to the height of the screen.
|
||||
// This is the height of the keyboard if it have 4 rows.
|
||||
int keyboardHeightPercent;
|
||||
// Scale some dimensions depending on orientation
|
||||
float horizontalIntervalScale = 1.f;
|
||||
float characterSizeScale = 1.f;
|
||||
String show_numpad_s = _prefs.getString("show_numpad", "never");
|
||||
show_numpad = "always".equals(show_numpad_s);
|
||||
@@ -115,7 +113,6 @@ public final class Config
|
||||
if ("landscape".equals(show_numpad_s))
|
||||
show_numpad = true;
|
||||
keyboardHeightPercent = _prefs.getInt("keyboard_height_landscape", 50);
|
||||
horizontalIntervalScale = 2.f;
|
||||
characterSizeScale = 1.25f;
|
||||
}
|
||||
else
|
||||
@@ -139,16 +136,16 @@ public final class Config
|
||||
longPressTimeout = _prefs.getInt("longpress_timeout", 600);
|
||||
longPressInterval = _prefs.getInt("longpress_interval", 65);
|
||||
margin_bottom = get_dip_pref_oriented(dm, "margin_bottom", 7, 3);
|
||||
keyVerticalInterval = get_dip_pref(dm, "key_vertical_space", 2);
|
||||
keyHorizontalInterval = get_dip_pref(dm, "key_horizontal_space", 2) * horizontalIntervalScale;
|
||||
key_vertical_margin = get_dip_pref(dm, "key_vertical_margin", 1.5f) / 100;
|
||||
key_horizontal_margin = get_dip_pref(dm, "key_horizontal_margin", 2) / 100;
|
||||
// Label brightness is used as the alpha channel
|
||||
labelBrightness = _prefs.getInt("label_brightness", 100) * 255 / 100;
|
||||
// Keyboard opacity
|
||||
keyboardOpacity = _prefs.getInt("keyboard_opacity", 100) * 255 / 100;
|
||||
keyOpacity = _prefs.getInt("key_opacity", 100) * 255 / 100;
|
||||
keyActivatedOpacity = _prefs.getInt("key_activated_opacity", 100) * 255 / 100;
|
||||
// Do not substract keyVerticalInterval from keyHeight because this is done
|
||||
// during rendered.
|
||||
// Do not substract key_vertical_margin from keyHeight because this is done
|
||||
// during rendering.
|
||||
keyHeight = dm.heightPixels * keyboardHeightPercent / 100 / 4;
|
||||
horizontal_margin =
|
||||
get_dip_pref_oriented(dm, "horizontal_margin", 3, 28);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package juloo.keyboard2;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.text.InputType;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.ExtractedText;
|
||||
@@ -18,7 +19,10 @@ public final class KeyEventHandler implements Config.IKeyEventHandler
|
||||
/** Consistent with [_mods]. This is a mutable state rather than computed
|
||||
from [_mods] to ensure that the meta state is correct while up and down
|
||||
events are sent for the modifier keys. */
|
||||
int _meta_state;
|
||||
int _meta_state = 0;
|
||||
/** Whether to force sending arrow keys to move the cursor when
|
||||
[setSelection] could be used instead. */
|
||||
boolean _move_cursor_force_fallback = false;
|
||||
|
||||
public KeyEventHandler(Looper looper, IReceiver recv)
|
||||
{
|
||||
@@ -32,6 +36,12 @@ public final class KeyEventHandler implements Config.IKeyEventHandler
|
||||
public void started(EditorInfo info)
|
||||
{
|
||||
_autocap.started(info, _recv.getCurrentInputConnection());
|
||||
// Workaround a bug in Acode, which answers to [getExtractedText] but do
|
||||
// not react to [setSelection] while returning [true].
|
||||
// Note: Using & to workaround a bug in Acode, which sets several
|
||||
// variations at once.
|
||||
_move_cursor_force_fallback = (info.inputType & InputType.TYPE_MASK_VARIATION &
|
||||
InputType.TYPE_TEXT_VARIATION_PASSWORD) != 0;
|
||||
}
|
||||
|
||||
/** Selection has been updated. */
|
||||
@@ -232,7 +242,8 @@ public final class KeyEventHandler implements Config.IKeyEventHandler
|
||||
return;
|
||||
ExtractedText et = get_cursor_pos(conn);
|
||||
// Fallback to sending key events
|
||||
if (et == null
|
||||
if (_move_cursor_force_fallback
|
||||
|| et == null
|
||||
|| _mods.has(KeyValue.Modifier.CTRL)
|
||||
|| _mods.has(KeyValue.Modifier.ALT)
|
||||
|| _mods.has(KeyValue.Modifier.META))
|
||||
@@ -256,7 +267,8 @@ public final class KeyEventHandler implements Config.IKeyEventHandler
|
||||
if (!_mods.has(KeyValue.Modifier.SHIFT))
|
||||
sel_start = sel_end;
|
||||
}
|
||||
conn.setSelection(sel_start, sel_end);
|
||||
if (!conn.setSelection(sel_start, sel_end))
|
||||
move_cursor_fallback(d);
|
||||
}
|
||||
|
||||
/** Send arrow keys as a fallback for editors that do not support
|
||||
|
@@ -299,16 +299,20 @@ public class Keyboard2View extends View
|
||||
_theme.keyBgPaint.setAlpha(_config.keyOpacity);
|
||||
_theme.keyDownBgPaint.setAlpha(_config.keyActivatedOpacity);
|
||||
_theme.keyBorderPaint.setAlpha(_config.keyOpacity);
|
||||
float y = _config.marginTop + _config.keyVerticalInterval / 2;
|
||||
float key_vertical_margin = _config.key_vertical_margin * _config.keyHeight;
|
||||
float key_horizontal_margin = _config.key_horizontal_margin * _keyWidth;
|
||||
// Add half of the key margin on the left and on the top as it's then added
|
||||
// on the right and on the bottom of every keys.
|
||||
float y = _config.marginTop + key_vertical_margin / 2;
|
||||
for (KeyboardData.Row row : _keyboard.rows)
|
||||
{
|
||||
y += row.shift * _config.keyHeight;
|
||||
float x = _config.horizontal_margin + _config.keyHorizontalInterval / 2;
|
||||
float keyH = row.height * _config.keyHeight - _config.keyVerticalInterval;
|
||||
float x = _config.horizontal_margin + key_horizontal_margin / 2;
|
||||
float keyH = row.height * _config.keyHeight - key_vertical_margin;
|
||||
for (KeyboardData.Key k : row.keys)
|
||||
{
|
||||
x += k.shift * _keyWidth;
|
||||
float keyW = _keyWidth * k.width - _config.keyHorizontalInterval;
|
||||
float keyW = _keyWidth * k.width - key_horizontal_margin;
|
||||
boolean isKeyDown = _pointers.isKeyDown(k);
|
||||
drawKeyFrame(canvas, x, y, keyW, keyH, isKeyDown);
|
||||
if (k.keys[0] != null)
|
||||
|
42
srcs/layouts/arab_hamvaj_tly.xml
Normal file
42
srcs/layouts/arab_hamvaj_tly.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<keyboard name="Talysh (تالشی همواج)" script="persian">
|
||||
<row>
|
||||
<key key0="ض" key2="۱"/>
|
||||
<key key0="ص" key1="~" key2="۲" key3="\@"/>
|
||||
<key key0="ث" key1="!" key2="۳" key3="\#"/>
|
||||
<key key0="ق" key1="﷼" key2="۴" key3="$"/>
|
||||
<key key0="ف" key2="۵" key3="٪"/>
|
||||
<key key0="غ" key1="،" key2="۶" key3="^"/>
|
||||
<key key0="ع" key2="۷" key3="&"/>
|
||||
<key key0="ه" key2="۸" key3="*"/>
|
||||
<key key0="خ" key2="۹" key3="(" key4=")"/>
|
||||
<key key0="ح" key2="۰"/>
|
||||
<key key0="ج"/>
|
||||
</row>
|
||||
<row>
|
||||
<key key0="ش" key1="َ" key2="tab"/>
|
||||
<key key0="س" key1="ُ"/>
|
||||
<key key0="ی" key4="ئ"/>
|
||||
<key key0="ب" key1="ّ"/>
|
||||
<key key0="ل" key3="ِ" key4="ﻻ"/>
|
||||
<key key0="ا" key1="آ" key2="-" key3="إ" key4="أ"/>
|
||||
<key key0="ت" key1="_" key2="+"/>
|
||||
<key key0="ن" key4="ۨ"/>
|
||||
<key key0="م"/>
|
||||
<key key0="ک"/>
|
||||
<key key0="گ" key1="ء"/>
|
||||
</row>
|
||||
<row>
|
||||
<key key0="ظ"/>
|
||||
<key key0="ط"/>
|
||||
<key key0="ژ" key2="«"/>
|
||||
<key key0="ز" key1="ْ" key2="»"/>
|
||||
<key key0="ر" key2="."/>
|
||||
<key key0="د" key2="؛" key3=":" key4="ذ"/>
|
||||
<key key0="پ" key2="؟"/>
|
||||
<key key0="و" key1="ۋ" key4="ۊ"/>
|
||||
<key key0="چ"/>
|
||||
<key key0="ٚ" key1="ٛ"/>
|
||||
<key key0="backspace" key2="delete"/>
|
||||
</row>
|
||||
</keyboard>
|
44
srcs/layouts/latn_qwerty_tly.xml
Normal file
44
srcs/layouts/latn_qwerty_tly.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<keyboard name="QWERTY (Talysh New Latin)" script="latin">
|
||||
<row>
|
||||
<key key0="g" key2="1" key4="q"/>
|
||||
<key key0="ú" key2="2" key4="ü"/>
|
||||
<key key0="e" key2="3" key3="\#"/>
|
||||
<key key0="ê" key2="4" key3="!"/>
|
||||
<key key0="r" key2="5" key3="$"/>
|
||||
<key key0="t" key2="6" key3="%"/>
|
||||
<key key0="y" key2="7" key3="^"/>
|
||||
<key key0="u" key2="8" key3="û"/>
|
||||
<key key0="i" key2="9" key3="*"/>
|
||||
<key key0="o" key1="ö" key2="0" key3="("/>
|
||||
<key key0="p" key3=")"/>
|
||||
<key key0="q" key3="&" key4="ğ"/>
|
||||
</row>
|
||||
<row>
|
||||
<key key0="á" key2="`" key4="a"/>
|
||||
<key key0="s" key2="~"/>
|
||||
<key key0="d" key1="{"/>
|
||||
<key key0="f" key2="}"/>
|
||||
<key key0="g" key2="-" key8="_"/>
|
||||
<key key0="h" key2="=" key3="+"/>
|
||||
<key key0="ž" key4="j"/>
|
||||
<key key0="k" key2="]" key3="["/>
|
||||
<key key0="l" key2="|" key3="\\"/>
|
||||
<key key0="ı"/>
|
||||
<key key0="a" key4="ə"/>
|
||||
<key key0="â" key3="\@"/>
|
||||
</row>
|
||||
<row>
|
||||
<key width="1.5" key0="shift" key2="loc capslock"/>
|
||||
<key key0="z"/>
|
||||
<key key0="x"/>
|
||||
<key key0="j" key2="<" key3="." key4="c"/>
|
||||
<key key0="v" key1="w" key2=">" key3=","/>
|
||||
<key key0="b" key2="\?" key3="/"/>
|
||||
<key key0="n" key2=":" key3=";"/>
|
||||
<key key0="m" key2=""" key3="'"/>
|
||||
<key key0="c" key4="ç"/>
|
||||
<key key0="š" key4="ş"/>
|
||||
<key width="1.5" key0="backspace" key2="delete"/>
|
||||
</row>
|
||||
</keyboard>
|
Reference in New Issue
Block a user