Skip to content

Commit

Permalink
Merge branch 'MAIN' into hangul-support
Browse files Browse the repository at this point in the history
  • Loading branch information
Julow committed May 2, 2024
2 parents c47e080 + d96414c commit a42828d
Show file tree
Hide file tree
Showing 15 changed files with 333 additions and 99 deletions.
2 changes: 2 additions & 0 deletions check_layout.output
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ Some keys contain whitespaces, unexpected: ́
# latn_qwerty_cz
Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder
1 warnings
# latn_qwerty_da
0 warnings
# latn_qwerty_es
0 warnings
# latn_qwerty_gb
Expand Down
6 changes: 6 additions & 0 deletions fastlane/metadata/android/zh-CN/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
此应用的主要功能是,通过将按键沿四角滑动,您可以输入更多字符。

此应用最初是为使用 Termux 的程序员而设计的。
现在对于日常使用来说也很完美。

此应用没有广告,不会发送任何网络请求,而且是开源的。
1 change: 1 addition & 0 deletions fastlane/metadata/android/zh-CN/short_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
适用于 Android 的轻量级、注重隐私的虚拟键盘。
1 change: 1 addition & 0 deletions fastlane/metadata/android/zh-CN/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Unexpected Keyboard
92 changes: 46 additions & 46 deletions res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<resources>
<string name="app_name_release">Unexpected Keyboard</string>
<string name="app_name_debug">Unexpected Keyboard (debug)</string>
<!-- <string name="short_description">Lightweight and privacy-conscious virtual keyboard for Android.</string> -->
<!-- <string name="store_description">"The main feature is that you can type more characters by swiping the keys towards the corners.
<string name="short_description">适用于 Android 的轻量级、注重隐私的虚拟键盘。</string>
<string name="store_description">"此应用的主要功能是,通过将按键沿四角滑动,您可以输入更多字符。

This application was originally designed for programmers using Termux.
Now perfect for everyday use.
此应用最初是为使用 Termux 的程序员而设计的。
现在对于日常使用来说也很完美。

This application contains no ads, doesn't make any network requests and is Open Source."</string> -->
此应用没有广告,不会发送任何网络请求,而且是开源的。"</string>
<string name="settings_activity_label">Unexpected Keyboard 设置</string>
<string name="pref_portrait">在竖屏模式下</string>
<string name="pref_landscape">在横屏模式下</string>
Expand All @@ -19,9 +19,9 @@ This application contains no ads, doesn't make any network requests and is Open
<string name="pref_key_activated_opacity">调整按下的按键的透明度</string>
<string name="pref_layout_e_system">系统设置</string>
<string name="pref_layout_e_custom">自定义布局</string>
<!-- <string name="pref_layouts_add">Add an alternate layout</string> -->
<!-- <string name="pref_layouts_item">Layout %1$d: %2$s</string> -->
<!-- <string name="pref_layouts_remove_custom">Remove layout</string> -->
<string name="pref_layouts_add">添加其他布局</string>
<string name="pref_layouts_item">布局 %1$d%2$s</string>
<string name="pref_layouts_remove_custom">移除布局</string>
<string name="pref_custom_layout_title">自定义布局</string>
<string name="pref_show_numpad_title">显示数字小键盘</string>
<string name="pref_show_numpad_never">从不</string>
Expand All @@ -33,24 +33,24 @@ This application contains no ads, doesn't make any network requests and is Open
<string name="pref_numpad_layout_e_high_first">大数字在上方</string>
<string name="pref_numpad_layout_e_low_first">小数字在上方</string>
<string name="pref_extra_keys_title">选择要显示的按键</string>
<!-- <string name="pref_extra_keys_custom">Add custom keys</string> -->
<!-- <string name="pref_extra_keys_internal">Select keys to add to the keyboard</string> -->
<string name="pref_extra_keys_custom">添加自定义按键</string>
<string name="pref_extra_keys_internal">选择要添加到键盘的按键</string>
<string name="pref_category_typing">输入</string>
<string name="pref_swipe_dist_title">滑动触发距离</string>
<string name="pref_swipe_dist_summary">输入按键四角的符号需要滑动的距离 (%s)</string>
<string name="pref_long_timeout_title">长按到开始重复输入的时间</string>
<string name="pref_long_interval_title">长按后每次重复输入的时间间隔</string>
<string name="pref_lock_double_tap_title">双击Shift键锁定大写</string>
<string name="pref_lock_double_tap_summary">任何时候都可以长按修改键以锁定</string>
<string name="pref_lock_double_tap_title">双击 Shift 键锁定大写</string>
<string name="pref_lock_double_tap_summary">任何时候长按修饰键均可将其锁定</string>
<string name="pref_category_behavior">行为</string>
<string name="pref_autocapitalisation_title">句首自动大写</string>
<string name="pref_autocapitalisation_summary">在句子的开头自动按下Shift</string>
<string name="pref_switch_input_immediate_title">切换到最近使用的键盘</string>
<string name="pref_switch_input_immediate_summary">切换键盘按钮的行为</string>
<!-- <string name="pref_vibrate_custom">Custom vibration</string> -->
<!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> -->
<!-- <string name="pref_pin_entry_enabled_title">Pin entry layout</string> -->
<!-- <string name="pref_pin_entry_enabled_summary">When typing numbers, dates and phone numbers</string> -->
<string name="pref_vibrate_custom">自定义振动</string>
<string name="pref_vibrate_duration_title">振动强度</string>
<string name="pref_pin_entry_enabled_title">数字输入布局</string>
<string name="pref_pin_entry_enabled_summary">输入数字、日期与电话号码时</string>
<string name="pref_category_style">样式</string>
<string name="pref_margin_bottom_title">键盘下边距</string>
<string name="pref_keyboard_height_title">键盘高度</string>
Expand All @@ -65,49 +65,49 @@ This application contains no ads, doesn't make any network requests and is Open
<string name="pref_theme_e_altblack">黑色带边框</string>
<string name="pref_theme_e_white">白色</string>
<string name="pref_theme_e_epaper">白色带边框</string>
<!-- <string name="pref_theme_e_desert">Desert</string> -->
<!-- <string name="pref_theme_e_jungle">Jungle</string> -->
<string name="pref_theme_e_desert">沙漠</string>
<string name="pref_theme_e_jungle">雨林</string>
<string name="pref_swipe_dist_e_very_short">非常短</string>
<string name="pref_swipe_dist_e_short">短</string>
<string name="pref_swipe_dist_e_default">中(默认)</string>
<string name="pref_swipe_dist_e_far">长</string>
<string name="pref_swipe_dist_e_very_far">非常长</string>
<string name="pref_key_horizontal_space">按键的左右边距</string>
<string name="pref_key_vertical_space">按键的上下边距</string>
<!-- <string name="pref_border_config_title">Customize borders</string> -->
<!-- <string name="pref_border_width_title">Border Width</string> -->
<!-- <string name="pref_corners_radius_title">Corner radius</string> -->
<string name="pref_border_config_title">自定义边界</string>
<string name="pref_border_width_title">边界宽度</string>
<string name="pref_corners_radius_title">圆角半径</string>
<string name="key_action_next">下一项</string>
<string name="key_action_done">完成</string>
<string name="key_action_go">前往</string>
<string name="key_action_prev">前一项</string>
<string name="key_action_prev">上一项</string>
<string name="key_action_search">搜索</string>
<string name="key_action_send">发送</string>
<string name="launcher_button_imesettings">启用键盘</string>
<!-- <string name="launcher_button_imepicker">Select keyboard</string> -->
<string name="launcher_button_imepicker">选择键盘</string>
<string name="launcher_description">这是一个虚拟键盘软件。点击按钮进入系统设置,然后启用 Unexpected-Keyboard 即可使用。</string>
<string name="launcher_sourcecode">这是一个免费且开源的软件。你可以在 Github 上找到源代码或者反馈 bug。</string>
<string name="launcher_sourcecode">这是一个免费且开源的软件。你可以在 GitHub 上找到源代码或反馈问题。</string>
<string name="launcher_tryhere">启用键盘后,可以在这里测试效果:</string>
<!-- <string name="launcher_tryhere_hint">Try here</string> -->
<!-- <string name="key_descr_capslock">Caps lock</string> -->
<!-- <string name="key_descr_compose">Compose</string> -->
<!-- <string name="key_descr_switch_greekmath">Greek &amp; math symbols</string> -->
<!-- <string name="key_descr_change_method">Switch keyboard</string> -->
<!-- <string name="key_descr_voice_typing">Voice typing</string> -->
<!-- <string name="key_descr_copy">Copy</string> -->
<!-- <string name="key_descr_paste">Paste</string> -->
<!-- <string name="key_descr_cut">Cut</string> -->
<!-- <string name="key_descr_selectAll">Select all</string> -->
<!-- <string name="key_descr_shareText">Share text</string> -->
<!-- <string name="key_descr_pasteAsPlainText">Paste as plain text</string> -->
<!-- <string name="key_descr_undo">Undo</string> -->
<!-- <string name="key_descr_redo">Redo</string> -->
<!-- <string name="key_descr_ª">Ordinal Indicator</string> -->
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="launcher_tryhere_hint">在这里测试</string>
<string name="key_descr_capslock">大写锁定</string>
<string name="key_descr_compose">Compose</string>
<string name="key_descr_switch_greekmath">希腊 &amp; 数学符号</string>
<string name="key_descr_change_method">切换键盘</string>
<string name="key_descr_voice_typing">语音输入</string>
<string name="key_descr_copy">复制</string>
<string name="key_descr_paste">粘贴</string>
<string name="key_descr_cut">剪切</string>
<string name="key_descr_selectAll">全选</string>
<string name="key_descr_shareText">分享文本</string>
<string name="key_descr_pasteAsPlainText">粘贴为纯文本</string>
<string name="key_descr_undo">撤销</string>
<string name="key_descr_redo">重做</string>
<string name="key_descr_ª">次序标志</string>
<string name="key_descr_º">次序标志</string>
<string name="key_descr_superscript">上标</string>
<string name="key_descr_subscript">下标</string>
<string name="key_descr_page_up">上一页</string>
<string name="key_descr_page_down">下一页</string>
<string name="key_descr_home">Home</string>
<string name="key_descr_end">End</string>
</resources>
3 changes: 3 additions & 0 deletions res/values/layouts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<item>latn_neo2</item>
<item>latn_qwerty_br</item>
<item>latn_qwerty_cz</item>
<item>latn_qwerty_da</item>
<item>latn_qwerty_es</item>
<item>latn_qwerty_gb</item>
<item>latn_qwerty_hu</item>
Expand Down Expand Up @@ -86,6 +87,7 @@
<item>Neo 2</item>
<item>QWERTY (Brasileiro)</item>
<item>QWERTY (Czech)</item>
<item>QWERTY (Danish)</item>
<item>QWERTY (Español)</item>
<item>QWERTY (UK)</item>
<item>QWERTY (Magyar)</item>
Expand Down Expand Up @@ -140,6 +142,7 @@
<item>@xml/latn_neo2</item>
<item>@xml/latn_qwerty_br</item>
<item>@xml/latn_qwerty_cz</item>
<item>@xml/latn_qwerty_da</item>
<item>@xml/latn_qwerty_es</item>
<item>@xml/latn_qwerty_gb</item>
<item>@xml/latn_qwerty_hu</item>
Expand Down
1 change: 1 addition & 0 deletions res/xml/method.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<subtype android:label="%s" android:languageTag="bg" android:imeSubtypeLocale="bg_BG" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=cyrillic,default_layout=cyrl_ueishsht,extra_keys=€"/>
<subtype android:label="%s" android:languageTag="bn" android:imeSubtypeLocale="bn_BD" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_us,extra_keys=৳"/>
<subtype android:label="%s" android:languageTag="cs" android:imeSubtypeLocale="cs_CZ" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwertz_cz,extra_keys=accent_aigu:á:é:í:ó:ú:ý|accent_ring:ů|accent_caron:č:ě:ň:ř:š:ž:ď:ť"/>
<subtype android:label="%s" android:languageTag="da" android:imeSubtypeLocale="da_DK" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_da,extra_keys=€|æ|å|ø"/>
<subtype android:label="%s" android:languageTag="de" android:imeSubtypeLocale="de_DE" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwertz_de,extra_keys=accent_trema:ä:ö:ü|ß|€"/>
<subtype android:label="%s" android:languageTag="el" android:imeSubtypeLocale="el" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=grek_qwerty,extra_keys=£|€"/>
<subtype android:label="%s" android:languageTag="en-CA" android:imeSubtypeLocale="en_CA" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=latin,default_layout=latn_qwerty_us"/>
Expand Down
2 changes: 1 addition & 1 deletion srcs/juloo.keyboard2/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void refresh(Resources res)
float swipe_scaling = Math.min(dm.widthPixels, dm.heightPixels) / 10.f * dpi_ratio;
float swipe_dist_value = Float.valueOf(_prefs.getString("swipe_dist", "15"));
swipe_dist_px = swipe_dist_value / 25.f * swipe_scaling;
slide_step_px = swipe_dist_px / 4.f;
slide_step_px = 0.2f * swipe_scaling;
vibrate_custom = _prefs.getBoolean("vibrate_custom", false);
vibrate_duration = _prefs.getInt("vibrate_duration", 20);
longPressTimeout = _prefs.getInt("longpress_timeout", 600);
Expand Down
3 changes: 1 addition & 2 deletions srcs/juloo.keyboard2/KeyEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public void key_up(KeyValue key, Pointers.Modifiers mods)
case Compose_pending:
_recv.set_compose_pending(true);
break;
case Cursor_move: move_cursor(key.getCursorMove()); break;
}
update_meta_state(old_mods);
}
Expand Down Expand Up @@ -222,8 +223,6 @@ void handle_editing_key(KeyValue.Editing ev)
case REPLACE: send_context_menu_action(android.R.id.replaceText); break;
case ASSIST: send_context_menu_action(android.R.id.textAssist); break;
case AUTOFILL: send_context_menu_action(android.R.id.autofill); break;
case CURSOR_LEFT: move_cursor(-1); break;
case CURSOR_RIGHT: move_cursor(1); break;
}
}

Expand Down
Loading

0 comments on commit a42828d

Please sign in to comment.