UI button mouse problem

Hi, urhofans.

This is my code

It works fine, but if I don’t move the cursor mouse and I press the function PressHelpDown is call again. Why?
Is there a solution for this problem?

Thank you!

after click on button, it still focused, so bunnon pressed again when you press space. it is tipycal behavior for UI (try same in Windows)
you can use SetFocusMode(FM_NOTFOCUSABLE)

Many thanks again! :wink: