-
-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve keyboard switch #311
Comments
Any updates regarding permission WRITE_SECURE_SETTINGS? KeyboardSwap for Keepass2Android allows swapping keyboards automatically by giving that permission: https://play.google.com/store/apps/details?id=keepass2android.plugin.keyboardswap2&hl=en Does Magikeyboard support this as well? |
@jed84 Currently no. As described above, there is a need for the ADB command to increase privileges and access this permission. I have not yet looked at the security impact. |
I like the way KeyboardSwap is allowing it in keepass2android. Would love to see this feature implemented here. I really miss a fast way to switch to the Magikeyboard. But other than that Magikeyboard is way more usable than the one from keepass2android. Keep up the good work! |
Can there be a globe button that alternates between ALL keyboards added? Currently, I have two keyboards + Magic keyboard (three in total). When I swap between keyboards by pressing the globe near space bar, it goes from English>Mother tongue>Magic keyboard. Once Ive reached Magic keyboard, I lose the globe icon to alternate back to English.I now have to long press the spacebar and click the keyboard I need. This keeps happening, eventually having to disable the Magic keyboard. Problem is that the Magic keyboard (closed database) bar comes in between me typing mixed text, alternating between two languages but once it reaches Magic keyboard, I can't alternate pressing the globe) Note: non Latin based language, AOSP keyboard, No Google play services. |
In #588 (Auto-Switch Keyboard) I wrote the following text:
I posted this here, may be my suggestions (ways how this can be implemented) help. |
In previous versions of KeePassDX, after switching to the Magikeyboard in a browser, clicking the lock, and selecting a key, the Magikeyboard would still be selected. I'm using 3.4.4 now (from F-Droid) and it now automatically switches me away from Magikeyboard after selecting the entry in KeePassDX. To be clear, here is my use case:
Expected behavior is that if the magikeyboard was used to get into KeePassDX, then the magikeyboard would be selected when returning to the app. It seems like the behavior in #588 was partially implemented (to help out the users that use the search feature within KeePassDX). I believe the text in the original issue is incorrect. My phone is not rooted, and I didn't run any adb commands to grant any extra permissions, yet the keyboard is clearly switching without an explicit user action. Is there anything I can do to help resolve this issue? |
@anon8675309 Let me put it in context:
If for some reason the search is open, the cursor will move to the search field and the keyboard will return to the previous keyboard. I haven't studied the security impacts yet so I don't know if I will add the permissions for this feature. |
Thank you for the explanation. Tapping the key icon now automatically places the focus in the search box, which automatically switches to the previous keyboard. I'd like KeePassDX to not autofocus on the search. This would enhance the UX and users who want to search could still click into the search box and retain the "switch back to previous keyboard" functionality. Should I open a new ticket about that, or could that be handled under this one? To others who find this ticket, a workaround is to always long press the key icon. This takes longer than it used to before to application filter was added, and it doesn't show the nice filtered view, but it does avoid the keyboard switching away from magikeyboard. Now you can just navigate to the group which has the entry you want and select it. No need to repeatedly switch to the Magikeyboard anymore! 🎉 As for the security risk of WRITE_SECURE_SETTINGS, it allows the app to do things that users would not expect. For example, an app with that permission could enable the GPS and start tracking the users movement, or enable the NFC feature and read the data of a tag that is within range. Android bundles all of these things together, which means there's no permission which would limit the app to be able to switch keyboards, but not do these other things. As long as the app is neither malicious nor compromised, it shouldn't make any practical difference, but it's bad practice to give apps more permissions than they actually need. For me, there's absolutely no way I'd be willing to grant this permission to any app. One option to attempt to serve everyone might be to detect if the app has this permission and do the force switch in that situation. If that's not possible (I'm not sure if apps can check to see what permissions they have), the switch could likely be put in a try/catch to switch for users who have this permission and silently fail for normal users. It seems like this would be a reasonable way to try to get everyone the functionality they wanr with thr security they are comfortable with. |
For me that would be fine given such an explanation of a usage that keyboard switching is a system setting which it needs permission for. Its floss and even if so doing things like enabling random settings it shouldnot is not such a big risk imho. You could mostly just annoy users.🙃🙃 After all, it can and should stay optional yeah, so no problem here. |
Only in some cases, if the search by domain name is performed and there are several entries that match then yes. But as you said ,if you do a long click on the key, the automatic search is not activated and the search field is not selected. I can try to improve the concept when it's an automatic search to not open the keyboard automatically but I don't know if it's possible easily.
New issue is good for the follow-up. ChackCallingPermission method should help to know if permission is granted. |
I have the same problem as @poppypundit described. I have 3 input methods used by the system in this order:
When I click globe icon on Possible solution |
It seems a "simple," though not ideal, solution would be to add a very basic keyboard to Magikeyboard, so when tapping the keyboard icon, instead of switching back to the user's main keyboard, it opens its own rudimentary one that would maybe not be preferable for normal use but would be enough to quickly type a few letters for the purpose of performing a search. That way, it wouldn't have to switch back from another keyboard, or have the user do so manually, it could just switch back to its own main interface. I realize this wouldn't be truly simple, because it would require different languages/layouts, but again, the keyboards could be very basic. |
Btw I have manually granted WRITE_SECURE_SETTINGS to some apps like "logcat reader" or "Scoop" (okay a different seeing but anyway) so it is possible to explain and present it in a quite user-friendly way. |
The keyboard switch when a new entry is integrated.
This is not possible at the moment because the Android operating system does not allow this change by the user. The automatic change of keyboard requires an elevation of the rights ('root' which is very dangerous on a device who manages the passwords)
https://stackoverflow.com/questions/38122702/android-change-keyboard-programmatically/38473659
or a specific adb command.
pm grant com.... android.permission.WRITE_SECURE_SETTINGS
Increasing the access rights of a component can have edge effects, if Google has chosen this level of security for the settings, it is not without reason. The various elements attached to it in the AOSP source code should be studied to see the implications.
To follow post : #230
The text was updated successfully, but these errors were encountered: