Page 2 of 2

Re: Lizard Attack

Posted: Fri Sep 07, 2012 5:19 pm
by Nixola
It should work - KeyConstant

Re: Lizard Attack

Posted: Fri Sep 07, 2012 5:52 pm
by coffee
Nixola wrote:It should work - KeyConstant
I actually understand his problem/confusion. All other non-alphanumerical keys use a real name (tab,right,home...). Space key is the only one that for fun uses something out-of-box and don't follow same naming protocol. Also even that the wiki seems straightforward the (space) in left column can induce in error those who just quick look. Because in the first time no one usually doubt that "space" won't work.
(space) Space key Replace (space) with the actual space character
I also still make the mistake of mechanically type "space" instead of " ", because it's more logic and intuitive. Dual acceptance of " " and "space" would be nice and would end that confusion.

EDITED: Also find/replace = " " than = "space" could have more probability of end in bad replacements.

Re: Lizard Attack

Posted: Fri Sep 07, 2012 8:03 pm
by qaisjp
coffee wrote:
Nixola wrote:It should work - KeyConstant
I actually understand his problem/confusion. All other non-alphanumerical keys use a real name (tab,right,home...). Space key is the only one that for fun uses something out-of-box and don't follow same naming protocol. Also even that the wiki seems straightforward the (space) in left column can induce in error those who just quick look. Because in the first time no one usually doubt that "space" won't work.
(space) Space key Replace (space) with the actual space character
I also still make the mistake of mechanically type "space" instead of " ", because it's more logic and intuitive. Dual acceptance of " " and "space" would be nice and would end that confusion.

EDITED: Also find/replace = " " than = "space" could have more probability of end in bad replacements.
keypressed should relate to the actual key, and not the character.
so pressing space would give "space", and enter would be "enter" (or "return")

then love.characterpressed would give the character pressed, so that multiple locales are supported (other country keyboards, with accents). So holding shift+m would make key=="M" (case sensitive)

Re: Lizard Attack

Posted: Fri Sep 07, 2012 8:35 pm
by Nixola
function love.keypressed(key, unicode)
local characterpressed = string.char(unicode)
end

Re: Lizard Attack

Posted: Sun Sep 09, 2012 3:11 am
by azonicrider
coffee wrote:
Nixola wrote:It should work - KeyConstant
I actually understand his problem/confusion. All other non-alphanumerical keys use a real name (tab,right,home...). Space key is the only one that for fun uses something out-of-box and don't follow same naming protocol. Also even that the wiki seems straightforward the (space) in left column can induce in error those who just quick look. Because in the first time no one usually doubt that "space" won't work.
(space) Space key Replace (space) with the actual space character
I also still make the mistake of mechanically type "space" instead of " ", because it's more logic and intuitive. Dual acceptance of " " and "space" would be nice and would end that confusion.

EDITED: Also find/replace = " " than = "space" could have more probability of end in bad replacements.
I agree.

Re: Lizard Attack

Posted: Sun Sep 09, 2012 3:14 am
by azonicrider
Roland_Yonaba wrote:
azonicrider wrote:however the Space bar just didn't want to cooperate.
Maybe because you made the wrong test. Have you tested key == " " ?
I thought about it, but didn't try it, as it just seemed crazy.

Re: Lizard Attack

Posted: Sun Sep 09, 2012 7:34 pm
by Robin
azonicrider wrote:I thought about it, but didn't try it, as it just seemed crazy.
(Insert facepalm here.)
There are a lot of things out there much crazier than that and yet they are still true.

Re: Lizard Attack

Posted: Sun Sep 09, 2012 8:06 pm
by qaisjp
Robin wrote:
azonicrider wrote:I thought about it, but didn't try it, as it just seemed crazy.
(Insert facepalm here.)
There are a lot of things out there much crazier than that and yet they are still true.
yeah like meatspin
It is still an unexpected string.