In the documents,the 0.6.0 version's KeyConstant is less than 0.50?
I find some keys are missing ,such F1 to F12,Alt,Ctrl,Shift,left,right,up,down,and so on
I try the F1,F4, find the key is useful,I think the document for 0.60 should update
the link is http://love2d.org/docs/KeyConstant.html
KeyConstant
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: KeyConstant
Oh, I'm sorry. I wrote that, as a test, but forgot to update it.
F1 is 'f1' etc.
the left alt key is 'lalt' etc.
the right alt key is 'ralt' etc.
the arrow keys are 'left', 'right', 'up', 'down'
See this for a complete conversion table.
F1 is 'f1' etc.
the left alt key is 'lalt' etc.
the right alt key is 'ralt' etc.
the arrow keys are 'left', 'right', 'up', 'down'
See this for a complete conversion table.
Help us help you: attach a .love.
- Garotas*Gostosas
- Prole
- Posts: 41
- Joined: Fri Apr 03, 2009 12:15 am
Re: KeyConstant
is there a bug with the key constants in 0.6.0 or is it just me?
when you press "up" arrow it does "down" arrow and vice versa.
left and right are inverted, too. check my .love out
i'm on a macbook with 10.5
PS: happy new year everybody!
when you press "up" arrow it does "down" arrow and vice versa.
left and right are inverted, too. check my .love out
i'm on a macbook with 10.5
PS: happy new year everybody!
I LOVE GAME, YEAH!
Re: KeyConstant
In your source, you have this:
That's saying that if the key that was pressed is not up, to set up to true. Thus, when someone presses the up arrow key, right, left, and down all get set to true -- but not up.
Right and left cancel each other out in the update phase in terms of movement, so all you see is the ball moving down, but in reality, it's moving every direction except up.
Change all those ~= to == and everything ought to function properly.
Code: Select all
function love.keypressed(k,u)
if k ~= "up" then
up = true
end
-- repeat for all the directions, in love.keyreleased too
Right and left cancel each other out in the update phase in terms of movement, so all you see is the ball moving down, but in reality, it's moving every direction except up.
Change all those ~= to == and everything ought to function properly.
- Garotas*Gostosas
- Prole
- Posts: 41
- Joined: Fri Apr 03, 2009 12:15 am
Who is online
Users browsing this forum: No registered users and 0 guests