love.keyreleased not working

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
elkiwydev
Prole
Posts: 8
Joined: Tue Jul 01, 2014 5:56 pm

love.keyreleased not working

Post 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 :(
User avatar
Zilarrezko
Party member
Posts: 345
Joined: Mon Dec 10, 2012 5:50 am
Location: Oregon

Re: love.keyreleased not working

Post 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.
elkiwydev
Prole
Posts: 8
Joined: Tue Jul 01, 2014 5:56 pm

Re: love.keyreleased not working

Post 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
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests