Long click - put a second action on long click

Long click - put a second action on long click

Hello all,
I have see post on how to make dual action with deep click.
I try to make dual action with long click ( on buton without deep click sensor )
My idea is to put A when short press, and to put B when long press on the same button, and of course to not do A + B when long press.
Is it possible ?

Thanks for your response