Simulate button click with keybind

How do I…

How do I simulate a (sprite) button click when a key is pressed?

I do need some visual feedback on key press too.

What is the expected result

Pressing a key simulates a (sprite) button click, and triggers subsequent events as programmed.

What is the actual result

I could not simulate the click for visual feedback (tween as set in object behavior); I suppose I could do manual tweening, but it wouldn’t be an elegant solution.

I dont really understand the question… You mean like tweening a button?

So basically, you press a sprite button with a mouse click, it works normally with all its behavior (tweening included).

I am trying to find a way to trigger a button press when I press a specific key, the game would think a specific button is pressed too (even just visually). Therefore, all it’s button tweening behavior and linked events would trigger as a result.

Just wondering if there is an elegant solution for it; even tween by triggering ButtonColorTintTween press behavior could do, without re-specifying all the fade/opacity/color all over again.

ohhhhhhhhhhhhh now i get it u mean like there is start button but if you click enter key on your keyboard it clicks the button?

Hi - Do you mean that you want it to trigger with a mouse click or a specific key press?
If so use ‘OR’
in the conditions and put both conditions under the ‘OR’

1 Like