This is possible via a plugin if your device sends a signal on both push and release.
Not all devices do this but you can try creating a new button and pushing down the button on your midi device, then clicking "learn entire control" and releasing the button. If this did work for creating a new control make sure "velocity sensitive" is disabled. You can test if it's working as you'd expect by setting the normal "push" button to do something and the new "release" button to do something else.
Plugin I made to send separate "keyboard key down" and "keyboard key release" inputs to windows: https://github.com/Jaggernaut555/midi-mixer-push-to-talk/