Good you’re asking! I have recently bought some parts for a solution… It’s ugly, but has been working great so far…
I got this usb switch:
Then I use two of these:
And a A-A cable which goes from the switchbox to teletype… Then the Keyboard to one “input” and the grid to the other, each via these adapters. Don’t forget to power the grid of course!!! I have a (monome) switch in between the grid connection.
Again, not pretty, but have it vertically standing at the side of my case, the long adapters hidden behind, and I can switch focus/input with the press of a button. (of course grid interaction stops when the focus is on the keyboard)
One caveat I found: some cables A-B wouldn’t work for some reason. Also had to sometimes re-power via the monome switch to re-gain focus on the grid. Using another cable fixed the issues I had. Might have been broken or poor quality cables. But this is still only tested for a few hours.