Switch keyboard from terminal?
Make an applescript:

tell application "System Events"
    keystroke " " using control down
end tell

PS. This is too slow, and allows more keys from the old keyboard to be entered before the switch is effectual.