"SPACE" bar doesn't work
- Juan Carlos
- Posts: 889
- Joined: Mon Sep 06, 2010 1:02 pm
"SPACE" bar doesn't work
Yes, the "SPACE" bar in OnKeyDown doesn't wotk under Windows and neither undert AmigaOS4 but other key as 'BACKSPACE’ yes and the others keys as the capital letters, ESC key but not "SPACE" why?
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: "SPACE" bar doesn't work
You must look for " " instead of "SPACE", e.g.
Code: Select all
Switch msg.action
Case "OnKeyDown":
If msg.key = " " Then NPrint("Space pressed")
EndSwitch
- Juan Carlos
- Posts: 889
- Joined: Mon Sep 06, 2010 1:02 pm
Re: "SPACE" bar doesn't work
Anda, I'm surprised because I think that is "SPACE" not " " this is my mistake, thinking as a leeter name, thanks Andreas but in the guide and manual you have specify this case to avoid the mistake of to think in bar name.Andreas wrote:You must look for " " instead of "SPACE", e.g.
Code: Select all
Switch msg.action Case "OnKeyDown": If msg.key = " " Then NPrint("Space pressed") EndSwitch
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: "SPACE" bar doesn't work
It's left as an exercise for the reader
Re: "SPACE" bar doesn't work
All joking aside, its not so amusing for TAB which you have to type:
- yes 8 spaces
and return is "\n" - obvious to me, but maybe not for others. Shame TAB and SPACE keys don't just work as documented as it tooks me ages to discover the real solution!
Code: Select all
" "
and return is "\n" - obvious to me, but maybe not for others. Shame TAB and SPACE keys don't just work as documented as it tooks me ages to discover the real solution!
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
Re: "SPACE" bar doesn't work
Here's one for you Andreas:
How will HW handle /n and other relevant char codes that there might be?
Code: Select all
Function afunction(msg)
Switch msg.action
Local key = UpperStr(msg.key)
EndSwitch
EndFunction
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: "SPACE" bar doesn't work
Where is it documented that Hollywood returns "TAB" and "SPACE" for these keys?djrikki wrote: Shame TAB and SPACE keys don't just work as documented as it tooks me ages to discover the real solution!
There's a rationale behind the behaviour. The idea is that you can do things like this:
Code: Select all
Switch msg.action
Case "OnKeyDown":
Print(msg.key)
EndSwitch
Re: "SPACE" bar doesn't work
I "discovered" the " " simply doing
DebugPrint(msg.key)
simple and fast to get the needed thing
DebugPrint(msg.key)
simple and fast to get the needed thing
Simone"Tuxedo"Monsignori, Perugia, ITALY.