I'm starting to learn CW with my father old straigth key,
to do so I have taken an usb mouse and soldered the electrical contacts of the Morse key to the mouse left button switch:
then connect our "usb morse key" to a pc and download Morse Learner or any similar software you like and configure it to take as input left mouse clicks: