How to make multiplayer game with different controller for each player?

I want to make a multiplayer game, which can let two people play together. I want to set a controller with arrow button and another controller with WASD for each of two people. How can I do that?

(Both blueprint and C++ OK)

Is this local or networked multiplayer?

Local, and both of the players share one keyboard to play (one use arrow buttons and the other use WASD)

This post should help get you started:

You’ll then want to put a switch in each player controller that changes the action event handlers based on the player controller index. You can set up Player 0 to use the default (WASD) events, and Player 1 can be switched to use the arrow controls.