I have the Linguist's Software IPA Unicode font, which requires a separate keyboard--internal, not external. I have Mac OS 11.5.1 and have created keyboard shortcuts within Word to switch from one font to another, but not from one keyboard to another. I have the keyboard icon on the menu bar, and have to manually select the IPA keyboard every time I want to type IPA. Anyone know how to create a shortcut?
This article (with screenshots) walks you through the process of setting custom hotkeys for switching keyboards.
The default hotkeys seem to be
Space, which cycle through the list of keyboards. Apparently, you cannot assign a shortcut to a specific keyboard layout.
If your questions refers to changing the keyboard layout from within Word, I would doubt whether an system-wide operation would generally be supported inside an application.