Switch keyboard action "wait for completion" option
Developer TODO (don't remove)
- [x] create new branch. put issue number at start of name
- [ ] update documentation
- [ ] merge and delete branch (don't squash because want commit history to see why I made changes)
This is an off-shoot from #1063, basically a side-thought that I wrote there, and is heavily related to #797 and possibly other issues.
The "Switch keyboard" action can take a fraction of a second to complete. This means that a keymap with the actions to switch to a Key Mapper input method and then type some text will always fail if there is no delay between the actions, unless that input method is already active:

This can be mitigated by the user by adding a delay, but this means there will always be a delay after triggering the key map, even if the input method was already selected:

It also means that the user has to figure out the right delay amount by themselves through trial and error, and the operation might still take longer sometimes depending on system load and other unpredictable factors.
It would be really nice if there was instead an option to wait exactly until the keyboard is ready:

This would not wait at all if the input method is already the active one, and if it isn't, it would only wait until the input method is switched (i.e. keyboard actions can be performed successfully).
I think I would just make this the default behaviour. If someone is wanting an action to change the keyboard then they probably need that to happen for a reason.
@NeatNit Does this even work for you with the delay? Because right now Key Mapper will ignore performing any actions if at least one has an error.
@NeatNit Does this even work for you with the delay? Because right now Key Mapper will ignore performing any actions if at least one has an error.
Yeah, it works. Version v2.4.3 from F-Droid