Impossible to key-press three near keys

Solution 1:

This is a hardware limitation of the built-in keyboard (and most non-gamer consumer keyboards)

You have to get a separate keyboard which supports NKRO (N-Key Rollover).

There might be issues with macOS compatibility with some n-key rollover keyboards USB keyboard acting strange with MacBook Pro

So check if it's compatible before you buy

Solution 2:

Using the macOS Keyboard Viewer gives you a good overview of the problem. If you hold down Z and X, and then try to press other buttons, you'll see that S, A, Q, W, 1 and 2 will not activate, but all other keys will.

Similarly, holding CV stops DFER34 from working. MN stops HJYU67.

enter image description here

You may want to use the low-level keyDown(with:) and keyUp(with:) methods of NSResponder, or other APIs used for gaming keys, before confirming that it's a hardware limitation.

(Note that programming help is off-topic here: try Stack Overflow for further discussion.)

https://code.bitbebop.com/macos-game-keyboard-input/

https://developer.apple.com/documentation/gamecontroller/gckeyboardinput