How many GetButton events can unity capture simultaneously?

I am creating a simple Pacman-like game that has 4 players.
but when they are pressing buttons of keyboard,sometimes the press button event is not captured(as it is not pressed).but when I release one of the buttons that are working,the other one that wasn’t working,work :expressionless:
(the buttons are for moving the player around)

my questions are:
1.how can I over come this problem?
2.how many buttons can be pressed(pressing and holding it down without releasing it) simultaneously?

It’s not a Unity limitation, it’s a physical hardware limitation. Most keyboards can only send three to four simultaneous key presses, due to how they’re wired.

Most gamepads are capable of sending all their button inputs at once, which is why multiplayer local games usually have only one player on the keyboard while others must use gamepads.

This is usually a hardware problem. Keyboards of different types can only register input from a certain amount of buttons at once.

I can not say for sure if this is the problem you are having, but with four players on one keyboard there is likely to be at least 8 buttons pressed at a time and keyboards can have a limit lower than that. Check what your keyboard can handle. The solution might actually have to be to get a new keyboard.

Unity itself can handle 8 keys or more perfectly fine.