Button Behavior and when to trigger on release
I am writing menu logic and was wondering if there are any general rules for when an on-screen button's function should trigger on release, vs when to trigger on press?
(A release trigger requires a press and a release while still hovering over the button. Most buttons follow this behavior I've noticed. A press trigger fires the moment the mouse button or key is pressed down.)
Primarily, I'm wondering how to handle keyboard presses, since cursor+clicking isn't the only way to press buttons in my menu. A user can also use the arrow keys to select different buttons. If they hit the "Confirm" button (space or another key), should this too only trigger on release, or should it trigger the moment it's pressed since it's using the cursor?