Use fixed keyboard for a given app I would like to tell my Android that when I'm in a given app it should switch to a given keyboard. My use case is that I want to use Hacker keyboard with Connectbot.
You could use Tasker for this. In case you don't know it: Tasker is the most complete automation tool for Android, combining &quot;conditions&quot; with &quot;tasks&quot; to so-called &quot;profiles&quot;. For your case, the Profile could look like this:
Condition: App (select Connectbot)
Task: Input Method Select
From the Tasker manual:

Show the Android Input Method picker dialog.
If some methods you have installed are not shown, make sure they are enabled in Android settings.
Note: unfortunately Android does not allow changing of the input method without user iteraction.

So from the last sentence you see, your final goal cannot be achieved. All you can get is the picker popping up, but you still have to pick your desired IME yourself. If you first want to try out whether that works for you, there's a 7-day trial version of Tasker available at their homepage.