How to set the "input key selector" button with a gamepad/keyboard?

Here’s how I managed to get it working.