How to center the cursor when movement input happens?

I’m using the third-person template and I’d like to be able to center the cursor (or maybe it’s easier to center the camera to the cursor) when movement input happens, because as it is, the cursor can get awkwardly stuck on the side of the screen until you wave the mouse around a bit.