If you get one which uses a keystroke to switch the video, then it will switch the keyboard too. So you need to find one with a physical switch to change the signal. Then connect just the video cables, not the keyboard or mouse.
You could also try to find one of the old style switches with a rotary switch which physically switches the video signal.
--
moto