Just go to walmart and buy one. They are cheap, and they work. That is where i got my digital KVM switch. Just double hit Scroll Lock, and it will switch video, keyboard and even mouse. Very slick. I think i payed $25us for it.
You're gonna spend less buying one at a store than you will trying to figure out how to make one by far, and considering this is your first post on the forums it's likley this is for a school project and something you should at least atempt to research yourself and come up with your own sollution before you ask for other people's help.