@Jean I have used the Linux Joystick Mapper program in the past to map the mouse to an analog stick for use in DOS games. I have no experience with using it with the Joy Con controller so I don't know if it will even work. You may wish to check this video first before you proceed.
If you wish to use Linux Joystick Mapper, then I would first suggest reading the official documentation, config.pdf, available in the doc folder of the Linux Joystick Mapper source code download.
Then you can take a look at these threads to see how to implement the joymap binary:
https://blog.petrockblock.com/forums/topic/mapping-a-game-controller-in-kodi/
https://retropie.org.uk/forum/topic/2032/dosbox-mapping-mouse-to-ps3-analog-stick
Once you've read these, I would suggest creating a simple mapper file that enters letters and numbers on a command line.