Touch Bar - separate down and up actions possible?

Hi, I'd like to make a Touch Bar action that presses one key when I press the button, and another when I release it. This is possible with regular keys (one action for send on down stroke; another for send on up stroke). Is this possible with the Touch Bar?