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
|
* Download attachments
|
||||||
* Change file size string format
|
* Change file size string format
|
||||||
* Prevent screenshot for all screen
|
* Prevent screenshot for all screen
|
||||||
|
* Auto performed "Go" key in Magikeyboard
|
||||||
* Fix crash when clearing clipboard
|
* Fix crash when clearing clipboard
|
||||||
* Fix attachments compressions
|
* Fix attachments compressions
|
||||||
* Fix dates
|
* Fix dates
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ class MagikIME : InputMethodService(), KeyboardView.OnKeyboardActionListener {
|
|||||||
fieldsAdapter?.onItemClickListener = object : FieldsAdapter.OnItemClickListener {
|
fieldsAdapter?.onItemClickListener = object : FieldsAdapter.OnItemClickListener {
|
||||||
override fun onItemClick(item: Field) {
|
override fun onItemClick(item: Field) {
|
||||||
currentInputConnection.commitText(entryInfoKey?.getGeneratedFieldValue(item.name) , 1)
|
currentInputConnection.commitText(entryInfoKey?.getGeneratedFieldValue(item.name) , 1)
|
||||||
|
goNextAutomatically()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
recyclerView.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this, androidx.recyclerview.widget.LinearLayoutManager.HORIZONTAL, true)
|
recyclerView.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this, androidx.recyclerview.widget.LinearLayoutManager.HORIZONTAL, true)
|
||||||
@@ -235,18 +236,21 @@ class MagikIME : InputMethodService(), KeyboardView.OnKeyboardActionListener {
|
|||||||
}
|
}
|
||||||
KEY_USERNAME -> {
|
KEY_USERNAME -> {
|
||||||
if (entryInfoKey != null) {
|
if (entryInfoKey != null) {
|
||||||
inputConnection.commitText(entryInfoKey!!.username, 1)
|
currentInputConnection.commitText(entryInfoKey!!.username, 1)
|
||||||
}
|
}
|
||||||
|
goNextAutomatically()
|
||||||
}
|
}
|
||||||
KEY_PASSWORD -> {
|
KEY_PASSWORD -> {
|
||||||
if (entryInfoKey != null) {
|
if (entryInfoKey != null) {
|
||||||
inputConnection.commitText(entryInfoKey!!.password, 1)
|
currentInputConnection.commitText(entryInfoKey!!.password, 1)
|
||||||
}
|
}
|
||||||
|
goNextAutomatically()
|
||||||
}
|
}
|
||||||
KEY_URL -> {
|
KEY_URL -> {
|
||||||
if (entryInfoKey != null) {
|
if (entryInfoKey != null) {
|
||||||
inputConnection.commitText(entryInfoKey!!.url, 1)
|
currentInputConnection.commitText(entryInfoKey!!.url, 1)
|
||||||
}
|
}
|
||||||
|
goNextAutomatically()
|
||||||
}
|
}
|
||||||
KEY_FIELDS -> {
|
KEY_FIELDS -> {
|
||||||
if (entryInfoKey != null) {
|
if (entryInfoKey != null) {
|
||||||
@@ -260,6 +264,11 @@ class MagikIME : InputMethodService(), KeyboardView.OnKeyboardActionListener {
|
|||||||
}// TODO Unlock key
|
}// TODO Unlock key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun goNextAutomatically() {
|
||||||
|
if (PreferencesUtil.isAutoGoActionEnable(this))
|
||||||
|
currentInputConnection.performEditorAction(EditorInfo.IME_ACTION_GO)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onPress(primaryCode: Int) {
|
override fun onPress(primaryCode: Int) {
|
||||||
val audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager?
|
val audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager?
|
||||||
if (audioManager != null)
|
if (audioManager != null)
|
||||||
|
|||||||
@@ -267,6 +267,12 @@ object PreferencesUtil {
|
|||||||
context.resources.getBoolean(R.bool.keyboard_notification_entry_default))
|
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 {
|
fun isKeyboardVibrationEnable(context: Context): Boolean {
|
||||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
return prefs.getBoolean(context.getString(R.string.keyboard_key_vibrate_key),
|
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>
|
<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_key" translatable="false">keyboard_entry_timeout_key</string>
|
||||||
<string name="keyboard_entry_timeout_default" translatable="false">300000</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>
|
<string name="keyboard_key_vibrate_key" translatable="false">keyboard_key_vibrate_key</string>
|
||||||
<bool name="keyboard_key_vibrate_default" translatable="false">true</bool>
|
<bool name="keyboard_key_vibrate_default" translatable="false">true</bool>
|
||||||
<string name="keyboard_key_sound_key" translatable="false">keyboard_key_sound_key</string>
|
<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_appearance_category">Appearance</string>
|
||||||
<string name="keyboard_theme_title">Keyboard theme</string>
|
<string name="keyboard_theme_title">Keyboard theme</string>
|
||||||
<string name="keyboard_keys_category">Keys</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_vibrate_title">Vibrate on keypress</string>
|
||||||
<string name="keyboard_key_sound_title">Sound on keypress</string>
|
<string name="keyboard_key_sound_title">Sound on keypress</string>
|
||||||
<string name="allow_no_password_title">Allow no master key</string>
|
<string name="allow_no_password_title">Allow no master key</string>
|
||||||
|
|||||||
@@ -48,6 +48,11 @@
|
|||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/keyboard_keys_category">
|
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
|
<SwitchPreference
|
||||||
android:key="@string/keyboard_key_vibrate_key"
|
android:key="@string/keyboard_key_vibrate_key"
|
||||||
android:title="@string/keyboard_key_vibrate_title"
|
android:title="@string/keyboard_key_vibrate_title"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
* Download attachments
|
* Download attachments
|
||||||
* Change file size string format
|
* Change file size string format
|
||||||
* Prevent screenshot for all screen
|
* Prevent screenshot for all screen
|
||||||
|
* Auto performed "Go" key in Magikeyboard
|
||||||
* Fix crash when clearing clipboard
|
* Fix crash when clearing clipboard
|
||||||
* Fix attachments compressions
|
* Fix attachments compressions
|
||||||
* Fix dates
|
* Fix dates
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
* Téléchargement des fichiers joints
|
* Téléchargement des fichiers joints
|
||||||
* Changement du texte de format de fichiers
|
* Changement du texte de format de fichiers
|
||||||
* Empêche la capture pour tous les écrans
|
* 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 du crash pendant le vidage du presse-papiers
|
||||||
* Correction des compressions des fichiers joints
|
* Correction des compressions des fichiers joints
|
||||||
* Correction des dates
|
* Correction des dates
|
||||||
|
|||||||
Reference in New Issue
Block a user