I think the easiest way of doing it would be to just set the onPressed and onReleased actions of the key to call the same methods that you were calling when you were pressing the buttons.
If you are wanting to just add a dit or a dah for each time that you press the key, then you will probably only have to set the onPressed action, but if you are wanting to continuously add dit's or dah's, then you will have to either specify the length of the dits or dahs and then continuously play them until you release the key, or you can start a timer and calculate how long you held the key down for and then add the dits or dahs based on how long you specified them as.