- on press enter button just start a timer (intervall 100ms) ... and initialize a counter with 0
- on press release just stop the timer
- inside the timer, check the counter, and if the counter is >9 you know the button is pressed longer than 1 sec.
Hope this helps
that's all done in your HMI just have a look to attached example ...
When you press the button, it triggers >1s, >2s and release