Hi
I am using Defold on a Mac.
I have one key bindinng - Button 1 > mouse_button_left
Every time I click the left button, I get two pressed everns and then two released events.
To try and work out why this is happening, I have inserted the following code in the on_input function:
if action_id == hash("mouse_button_left") then
if action.pressed then
print "pressed"
elseif action.released then
print "released"
end
end
I get two “pressed” messages and (then when I released the mouse) two “released” messages.
Any idea why this is happening? It’s messing up my code as I have a button that can only be pressed once yet it is receiveing two pressed triggers.
Is there a solution or anything that I am missing something?