キーボードの 1 / 2 / 3 または下のボタンで切り替え。midori239の switchComponent() から抜粋したロジックをそのまま動かしています。
switchComponent()