press and release evnets want

i want if i can create 2 evnets when press and release my mouse button on some Fvwmbuttons. seems one mouse button can only defined once.

below is my test part code:

*DockButtons: (1x1, Id record, Icon "r-24-end.png", PressIcon "r-24-rec.png", Action(ActionOnPress, Mouse 1) Exec echo true > ~/press)

i want like this:

Action(ActionOnPress, Mouse 1) Exec echo true > ~/press, Action(ActionOnRelease, Mouse 1) Exec echo true > ~/release

this part is for my recored.bash. i want press to start record audio. and release to stop it.
:laughing: perhaps seems difficult.

Not possible.

– Thomas Adam

something like this will solve your problem:

addtofunc pressRelease
 + I piperead 'echo echo `date`'
 + C piperead 'echo echo `date`'

mouse 1 T C pressRelease

unfortunately for you, it won’t capture the mouse release if you move away the cursor.
use + M in pressRelease to detect mouse movement

And cause no end of problems. No, you’re much better off just defining different actions to FvwmButtons based on different mouse clicks or create toggling actions for just one.

– Thomas Adam