The standard (only?) method of utilizing complex mouse/trackpad/pen gestures on Linux is Easystroke. Before anyone mentions touchegg/libinput-gestures and similar, they serve a different purpose. Those support very simple gestures (swipe up, swipe down) and multitouch variants thereoff.
However easystroke supports complex gestures. For example you could draw an @ symbol, or a s shape, and each of those would produce a different result.
Unfortunately, easystroke itself hasn't had any activity since 2014, with the last release being 2013. It still works, but there's no response on the activity tracker, the author probably having moved on. With the shift to wayland, are any projects actively looking at this niche? Or is this a capability which will probably just go away in the future.