Replace numpad. with button presses?

Can you replace numpad. with button presses?

what

Im trying to make a winch that uses commands instead of using key presses.
I been thinking to do the same as perp with making winches but that shit looks advanced.