mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Auto performed "Go" key in Magikeyboard
This commit is contained in:
@@ -2,6 +2,7 @@ KeepassDX (2.5.0.0beta26)
|
||||
* Download attachments
|
||||
* Change file size string format
|
||||
* Prevent screenshot for all screen
|
||||
* Auto performed "Go" key in Magikeyboard
|
||||
* Fix crash when clearing clipboard
|
||||
* Fix attachments compressions
|
||||
* Fix dates
|
||||
|
||||
@@ -114,6 +114,7 @@ class MagikIME : InputMethodService(), KeyboardView.OnKeyboardActionListener {
|
||||
fieldsAdapter?.onItemClickListener = object : FieldsAdapter.OnItemClickListener {
|
||||
override fun onItemClick(item: Field) {
|
||||
currentInputConnection.commitText(entryInfoKey?.getGeneratedFieldValue(item.name) , 1)
|
||||
goNextAutomatically()
|
||||
}
|
||||
}
|
||||
recyclerView.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this, androidx.recyclerview.widget.LinearLayoutManager.HORIZONTAL, true)
|
||||
@@ -235,18 +236,21 @@ class MagikIME : InputMethodService(), KeyboardView.OnKeyboardActionListener {
|
||||
}
|
||||
KEY_USERNAME -> {
|
||||
if (entryInfoKey != null) {
|
||||
inputConnection.commitText(entryInfoKey!!.username, 1)
|
||||
currentInputConnection.commitText(entryInfoKey!!.username, 1)
|
||||
}
|
||||
goNextAutomatically()
|
||||
}
|
||||
KEY_PASSWORD -> {
|
||||
if (entryInfoKey != null) {
|
||||
inputConnection.commitText(entryInfoKey!!.password, 1)
|
||||
currentInputConnection.commitText(entryInfoKey!!.password, 1)
|
||||
}
|
||||
goNextAutomatically()
|
||||
}
|
||||
KEY_URL -> {
|
||||
if (entryInfoKey != null) {
|
||||
inputConnection.commitText(entryInfoKey!!.url, 1)
|
||||
currentInputConnection.commitText(entryInfoKey!!.url, 1)
|
||||
}
|
||||
goNextAutomatically()
|
||||
}
|
||||
KEY_FIELDS -> {
|
||||
if (entryInfoKey != null) {
|
||||
@@ -260,6 +264,11 @@ class MagikIME : InputMethodService(), KeyboardView.OnKeyboardActionListener {
|
||||
}// TODO Unlock key
|
||||
}
|
||||
|
||||
private fun goNextAutomatically() {
|
||||
if (PreferencesUtil.isAutoGoActionEnable(this))
|
||||
currentInputConnection.performEditorAction(EditorInfo.IME_ACTION_GO)
|
||||
}
|
||||
|
||||
override fun onPress(primaryCode: Int) {
|
||||
val audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager?
|
||||
if (audioManager != null)
|
||||
|
||||
@@ -267,6 +267,12 @@ object PreferencesUtil {
|
||||
context.resources.getBoolean(R.bool.keyboard_notification_entry_default))
|
||||
}
|
||||
|
||||
fun isAutoGoActionEnable(context: Context): Boolean {
|
||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
return prefs.getBoolean(context.getString(R.string.keyboard_auto_go_action_key),
|
||||
context.resources.getBoolean(R.bool.keyboard_auto_go_action_default))
|
||||
}
|
||||
|
||||
fun isKeyboardVibrationEnable(context: Context): Boolean {
|
||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
return prefs.getBoolean(context.getString(R.string.keyboard_key_vibrate_key),
|
||||
|
||||
@@ -119,6 +119,8 @@
|
||||
<bool name="keyboard_notification_entry_clear_close_default" translatable="false">true</bool>
|
||||
<string name="keyboard_entry_timeout_key" translatable="false">keyboard_entry_timeout_key</string>
|
||||
<string name="keyboard_entry_timeout_default" translatable="false">300000</string>
|
||||
<string name="keyboard_auto_go_action_key" translatable="false">keyboard_auto_go_action_key</string>
|
||||
<bool name="keyboard_auto_go_action_default" translatable="false">true</bool>
|
||||
<string name="keyboard_key_vibrate_key" translatable="false">keyboard_key_vibrate_key</string>
|
||||
<bool name="keyboard_key_vibrate_default" translatable="false">true</bool>
|
||||
<string name="keyboard_key_sound_key" translatable="false">keyboard_key_sound_key</string>
|
||||
|
||||
@@ -363,6 +363,8 @@
|
||||
<string name="keyboard_appearance_category">Appearance</string>
|
||||
<string name="keyboard_theme_title">Keyboard theme</string>
|
||||
<string name="keyboard_keys_category">Keys</string>
|
||||
<string name="keyboard_auto_go_action_title">Auto key action</string>
|
||||
<string name="keyboard_auto_go_action_summary">Action of the "Go" key performed automatically after pressing a "Field" key</string>
|
||||
<string name="keyboard_key_vibrate_title">Vibrate on keypress</string>
|
||||
<string name="keyboard_key_sound_title">Sound on keypress</string>
|
||||
<string name="allow_no_password_title">Allow no master key</string>
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:title="@string/keyboard_keys_category">
|
||||
<SwitchPreference
|
||||
android:key="@string/keyboard_auto_go_action_key"
|
||||
android:title="@string/keyboard_auto_go_action_title"
|
||||
android:summary="@string/keyboard_auto_go_action_summary"
|
||||
android:defaultValue="@bool/keyboard_auto_go_action_default"/>
|
||||
<SwitchPreference
|
||||
android:key="@string/keyboard_key_vibrate_key"
|
||||
android:title="@string/keyboard_key_vibrate_title"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
* Download attachments
|
||||
* Change file size string format
|
||||
* Prevent screenshot for all screen
|
||||
* Auto performed "Go" key in Magikeyboard
|
||||
* Fix crash when clearing clipboard
|
||||
* Fix attachments compressions
|
||||
* Fix dates
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
* Téléchargement des fichiers joints
|
||||
* Changement du texte de format de fichiers
|
||||
* Empêche la capture pour tous les écrans
|
||||
* Touche "Go" exécutée automatiquement dans Magikeyboard
|
||||
* Correction du crash pendant le vidage du presse-papiers
|
||||
* Correction des compressions des fichiers joints
|
||||
* Correction des dates
|
||||
|
||||
Reference in New Issue
Block a user