Page 1 of 1

love.keyreleased not working

Posted: Wed Jul 02, 2014 8:40 am
by elkiwydev
Hi everyone,

I'm having some trouble with the "love.keyreleased" function and I don't have clue to what the problem is.
I litterally copy and pasted the example from the wiki in to my game but nothing happen.
I put this :

Code: Select all

function love.keyreleased(key)
    if key == "escape" then
        love.event.quit()
    end
end
right below the love.update function, I tryed different keys, I tryed to print a text instead quitting but nothing.. It seems that the whole function isn't recognized..

Also i tryed the love.keypressed and that works fine..

Please help a noob :(

Re: love.keyreleased not working

Posted: Wed Jul 02, 2014 9:17 am
by Zilarrezko
hmm, I copy and pasted it and it worked... and everything looks fine (no misspellings at least)

I event tried disabling the keyboard module and it still worked. (probably because the keyboard module is for love.keyboard)

Could you shoot us a zip or .love of your code? That will help to see if anything else is interfering with that function or something.

Re: love.keyreleased not working

Posted: Wed Jul 02, 2014 9:26 am
by elkiwydev
Nevermind.. I found out that I'm importing a custom love.run which messed up with the callbacks function.. I disabled it and now it works fine ;)

Thank you anyway :D