How can I do this in a way that will allow me to detect a user's imperfect gesture shape input and have my scripts differentiate between the different gestures/shapes?
This is not only a touch-screen function. It must work with a normal cursor as well, with the user's mouse.
Websites can use this to allow their users to use gesture shortcuts, with both mouse and hand, to visit specific pages, or trigger functions that the user uses often within a site. For example, a user could draw a question mark on the center of any stack overflow page to be sent straight to the new question page. Users could even be allowed to make their own gestures for viewing favorite questions, going to the home page or submitting an answer for the current question page.