Skip to content

Commit b272c82

Browse files
authored
feat: add language switch key (#357)
* feat: add language switch key The emoji key is not visible when language switch key is enabled. This will be addressed in another pull request. Refs: #62 * docs: update changelog * refactor: split extensions into different files * feat: activate space bar cursor control immediately on swipe Refs: #129 * docs: update changelog * fix: provide proper label for the language key * fix: address lint issues * fix: cancel long-press when activating cursor control * fix: prevent modifying the space key in number mode * fix: reduce margin in space bar background when key borders are disabled
1 parent e84f038 commit b272c82

File tree

18 files changed

+433
-282
lines changed

18 files changed

+433
-282
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88
### Added
9+
- Optional key to quickly switch keyboard language ([#62])
910
- Added apostrophe as a pop-up character on the dot key ([#356])
1011

12+
### Changed
13+
- The space bar now shows the currently selected language ([#62])
14+
- Space bar cursor control now activates immediately on swipe ([#129])
15+
1116
## [1.7.0] - 2025-12-16
1217
### Added
1318
- Option to disable the emoji key ([#234])
@@ -116,9 +121,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
116121
- Initial release
117122

118123
[#47]: https://github.com/FossifyOrg/Keyboard/issues/47
124+
[#62]: https://github.com/FossifyOrg/Keyboard/issues/62
119125
[#78]: https://github.com/FossifyOrg/Keyboard/issues/78
120126
[#100]: https://github.com/FossifyOrg/Keyboard/issues/100
121127
[#117]: https://github.com/FossifyOrg/Keyboard/issues/117
128+
[#129]: https://github.com/FossifyOrg/Keyboard/issues/129
122129
[#133]: https://github.com/FossifyOrg/Keyboard/issues/133
123130
[#134]: https://github.com/FossifyOrg/Keyboard/issues/134
124131
[#136]: https://github.com/FossifyOrg/Keyboard/issues/136

app/detekt-baseline.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
<ID>ComplexCondition:MyKeyboardView.kt$MyKeyboardView$(show &amp;&amp; keyboardViewBinding?.clipboardValue!!.alpha == 0f) || (!show &amp;&amp; keyboardViewBinding?.clipboardValue!!.alpha == 1f)</ID>
99
<ID>ComplexCondition:MyKeyboardView.kt$MyKeyboardView$key.label.isNotEmpty() &amp;&amp; key.code != KEYCODE_MODE_CHANGE &amp;&amp; key.code != KEYCODE_SYMBOLS_MODE_CHANGE &amp;&amp; key.code != KEYCODE_SHIFT</ID>
1010
<ID>ComplexCondition:MyKeyboardView.kt$MyKeyboardView$mBuffer == null || mKeyboardChanged &amp;&amp; (mBuffer!!.width != width || mBuffer!!.height != height)</ID>
11-
<ID>CyclomaticComplexMethod:Context.kt$fun Context.getKeyboardLanguageText(language: Int): String</ID>
12-
<ID>CyclomaticComplexMethod:Context.kt$fun Context.setupKeyboardDialogStuff( windowToken: IBinder, view: View, dialog: AlertDialog.Builder, titleId: Int = 0, titleText: String = "", cancelOnTouchOutside: Boolean = true, callback: ((alertDialog: AlertDialog) -&gt; Unit)? = null )</ID>
11+
<ID>CyclomaticComplexMethod:ContextExt.kt$fun Context.setupKeyboardDialogStuff( windowToken: IBinder, view: View, dialog: AlertDialog.Builder, titleId: Int = 0, titleText: String = "", cancelOnTouchOutside: Boolean = true, callback: ((alertDialog: AlertDialog) -&gt; Unit)? = null )</ID>
1312
<ID>CyclomaticComplexMethod:MyKeyboard.kt$MyKeyboard$@SuppressLint("UseCompatLoadingForDrawables") private fun loadKeyboard(context: Context, parser: XmlResourceParser)</ID>
1413
<ID>CyclomaticComplexMethod:MyKeyboardView.kt$MyKeyboardView$@SuppressLint("UseCompatLoadingForDrawables") private fun onBufferDraw()</ID>
1514
<ID>CyclomaticComplexMethod:MyKeyboardView.kt$MyKeyboardView$override fun onTouchEvent(me: MotionEvent): Boolean</ID>
@@ -54,7 +53,6 @@
5453
<ID>MaxLineLength:ClipsActivityAdapter.kt$ClipsActivityAdapter$override fun onCreateViewHolder(parent: ViewGroup, viewType: Int)</ID>
5554
<ID>MaxLineLength:ClipsKeyboardAdapter.kt$ClipsKeyboardAdapter$layerDrawable.findDrawableByLayerId(R.id.clipboard_background_stroke).applyColorFilter(context.getStrokeColor())</ID>
5655
<ID>MaxLineLength:Config.kt$Config$set(lastExportedClipsFolder) = prefs.edit().putString(LAST_EXPORTED_CLIPS_FOLDER, lastExportedClipsFolder).apply()</ID>
57-
<ID>MaxLineLength:Context.kt$fun</ID>
5856
<ID>MaxLineLength:EmojisAdapter.kt$EmojisAdapter.EmojiCategoryViewHolder$inner</ID>
5957
<ID>MaxLineLength:ExportClipsDialog.kt$ExportClipsDialog$exportClipsFilename.setText("${activity.getString(R.string.app_launcher_name)}_${activity.getCurrentFormattedDateTime()}")</ID>
6058
<ID>MaxLineLength:ExportClipsDialog.kt$ExportClipsDialog$val activity: BaseSimpleActivity</ID>
@@ -93,7 +91,7 @@
9391
<ID>MaxLineLength:SimpleKeyboardIME.kt$SimpleKeyboardIME$layerDrawable.findDrawableByLayerId(R.id.clipboard_background_shape).applyColorFilter(getProperBackgroundColor())</ID>
9492
<ID>MaxLineLength:SimpleKeyboardIME.kt$SimpleKeyboardIME$override</ID>
9593
<ID>MaxLineLength:SwitchLanguageDialog.kt$SwitchLanguageDialog$addView(radioButton, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))</ID>
96-
<ID>NestedBlockDepth:Context.kt$fun Context.setupKeyboardDialogStuff( windowToken: IBinder, view: View, dialog: AlertDialog.Builder, titleId: Int = 0, titleText: String = "", cancelOnTouchOutside: Boolean = true, callback: ((alertDialog: AlertDialog) -&gt; Unit)? = null )</ID>
94+
<ID>NestedBlockDepth:ContextExt.kt$fun Context.setupKeyboardDialogStuff( windowToken: IBinder, view: View, dialog: AlertDialog.Builder, titleId: Int = 0, titleText: String = "", cancelOnTouchOutside: Boolean = true, callback: ((alertDialog: AlertDialog) -&gt; Unit)? = null )</ID>
9795
<ID>NestedBlockDepth:MyKeyboard.kt$MyKeyboard$@SuppressLint("UseCompatLoadingForDrawables") private fun loadKeyboard(context: Context, parser: XmlResourceParser)</ID>
9896
<ID>NestedBlockDepth:MyKeyboardView.kt$MyKeyboardView$@SuppressLint("UseCompatLoadingForDrawables") private fun onBufferDraw()</ID>
9997
<ID>NestedBlockDepth:MyKeyboardView.kt$MyKeyboardView$override fun onTouchEvent(me: MotionEvent): Boolean</ID>

0 commit comments

Comments
 (0)