First you need to download and add two libraries keypad and joystick:
https://playground.arduino.cc/Code/Keypad/
https://github.com/MHeironimus/ArduinoJoystickLibrary
Then you can just download my code (it’s zipped):
and upload it to your Arduino Pro Micro.
Let’s go through the code:
#include <Joystick.h>
…
more