The double tap is easy:
Obviously replace the K input with whatever you want, and replace the 0.3 seconds with whatever tap timeout you want. For something like a tripple tap, just check whether or not #Presses is 3.