If you are willing to have 2 computers, you can hack
something up with a shared session using something like
screen
or vnc so that two
keyboards going to 2 computers show up on a shared session
on one screen.
There are also many utilities that can help you switch in
a hurry. Or some
special keyboards to
make it very easy. (Dunno how well it works though.)
Comment on Re (tilly) 1: paired programming & 2 keyboards