Okay, this isn’t exactly a Keyman solution, but Keyman ended up being helpful, so I’ll record it here for posterity.
Here is an AutoHotKey script that changes the current input language:
PostMessage, 0x50, 0, 0x2000,, A
In the line above
0x2000 is what identifies the input language. How might one find that identifier? Well, perhaps by consulting this list. Or you can run this Visual Basic script to get the identifiers for your installed keyboards.
Set Keyman = CreateObject("keymanapi.Keyman")
For Each lang In Keyman.Languages
Wscript.Echo lang.LayoutName & " 0x" & Hex(lang.LangID)
(Call the file
keyman-list.vbs and run it from the command line as
This is handy because I’m not sure how else I would have learned, e.g., that SIL’s IPA keyboard’s identifier is 0x2000.
It’s a mild irritant not to be able to switch to different layouts for the same language, but that’s another story.