How to make hold button code???

(deleted)

Without seeing the code it is impossible to help.

Is the code doing what its author intended, or have you discovered a bug?

...R