Follow these steps:
- Open the desired game
- Pause the game screen
- Press F10 to open the keymapping settings
- Place the buttons and enter the keys that you want to link it with
- Exit the settings (it will automatically save the button placements)
Now you’re good to go