How to play Portal 2 co-op on one PC with 2 Keyboards and 2 Mice?

Solution 1:

When you use two keyboards and mice, the computer cannot differentiate between the two. If you move one mouse, the cursor will move - with the other mouse, the cursor will also move; there is no difference. You can also type using two keyboards at once.

This unfortunately means you cannot pay co-op with two sets of keyboard and mouse. The 360-emulator reads the controllers unique id, which is used to tell them apart. Keyboards and mice do not have this capability.

Solution 2:

I finally found a way to play with my friend with each player using a keyboard.

What you will need:

  • keyboard splitter (You can google to find the latest version, I used 2.2.0.0 from https://www.softpedia.com/get/System/System-Miscellaneous/Gaming-Keyboard-Splitter.shtml)

How to use:

  1. Run the keyboard splitter .exe and install it's dependencies (restart your computer before continuing)
  2. Change the slot counts to 1
  3. Select the keyboard that you want to disguise as an Xbox controller (If there are multiple options, because of secondary or virtual keyboards, you can find out which keyboard you're using by checking the Input Device Monitor included in the application, it shows you the origin of button presses and clicks)
  4. Create a new preset (just replace the text in the box that says default and save)
  5. Map your keyboard buttons to the virtual controller's buttons
  6. Press Start and enjoy

The result:

What you're basically going to do is block your keyboard's inputs and mask them as an Xbox controller's inputs. All the other player has to do is connect and use his/her keyboard.

Q&A:

Q: How do I alt-tab out of the game if my keyboard is disabled?

A: Push left Ctrl five times to disable input blocking and you can use alt-tab.

But be careful, your inputs are still being sent as Xbox inputs at the same time (your keyboard inputs are unblocked but the application is still working), so if for example, you have bound S to D-pad Down, it'll type S and move down at the same time.

Q: Can I use my keyboard at the same time?

A: No, this would mess up the inputs, but you can connect a second keyboard/use a virtual keyboard/use a keyboard app on your phone. You could also just stop and restart keyboard splitter but I guess that would get old fast