You can use floating divisions (described in the manual) to switch divisions connected to a particular physical keyboard.
You can assign a piston (key or computer keyboard key) to almost any function. Open the appropriate large control panel (View | large floating control panel) and autodetect the function you want assigned to the piston to operate. (Right click the control/switch on the floating control panel, select autodetect and press the piston (key or computer keyboard key) you want to operate that control/switch.) You probably need to set the option to toggle the control (see the autodetect dialog).
Iain