How to create a double click reaction?

I’m looking for a way to register a quick double click of a button so that it does something different that when clicked just once. Say W=walkforward double tap W=sprint blueprints please